react-material-webpack-boilerplate icon indicating copy to clipboard operation
react-material-webpack-boilerplate copied to clipboard

Client bundle does not work

Open ghost opened this issue 10 years ago • 5 comments

Generated code in build/public does not work. Main app.jsx returns null. I switched over to the webpack/react-starter and added material-ui, the build/public code works over there. I'm not good enough with react/webpack to tell you what might be wrong, but there are problems for sure. BTW this is an good builder plate, I like what you did with the fork, simplifying folder structure for a react beginner like me.

ghost avatar Jul 02 '15 02:07 ghost

@LookLikeAPro I've upgraded all the dependencies to their latest versions and everything seems to be working smoothly. Can you give it a try again and let me know if you run into any issues?

lern avatar Jul 06 '15 02:07 lern

@lern thanks for looking into this, I really appreciate it. Still can you explain what you are doing to run the client side bundle? I assume you just use this basic html code, but it doesn't seem to work. content renders <noscript>.

<!DOCTYPE html>
<html>
<head>
  <meta charset='utf-8'>
  <link rel='stylesheet' href='main.css'>
</head>
<body>
  <div id='content'></div>
  <script src='main.js'></script>
</body>
</html>

LookLikeAPro avatar Jul 09 '15 03:07 LookLikeAPro

@LookLikeAPro After cloning the repo and running npm install, try following the instructions here.

  1. npm run hot-dev-server
  2. npm run start-dev in another terminal
  3. Navigate to http://localhost:8080/

Please let me know if you're still having issues after doing that.

lern avatar Jul 10 '15 02:07 lern

@lern this works thankfully. The problem is with the other approach.

  1. npm run bulid
  2. run build/public with the template
<!DOCTYPE html>
<html>
<head>
  <meta charset='utf-8'>
  <link rel='stylesheet' href='main.css'>
</head>
<body>
  <div id='content'></div>
  <script src='main.js'></script>
</body>
</html>

Does this work for you? It shows <noscript> for me. Thanks

LookLikeAPro avatar Jul 10 '15 23:07 LookLikeAPro

@LookLikeAPro hmm, I see the issue now. I'll take a look at this and try to resolve it.

lern avatar Jul 14 '15 03:07 lern