Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading development server #84

Open
aleyan opened this issue Jun 9, 2017 · 1 comment
Open

Reloading development server #84

aleyan opened this issue Jun 9, 2017 · 1 comment

Comments

@aleyan
Copy link

aleyan commented Jun 9, 2017

I am trying to run a development server locally and code doesn't appear to reload code in the browser on save of file or on reload of browser. This happens when I run the server with npm run start.

Alternatively I have tried running a development server using nwb with npm run serve and then the code reloading does work. However, in this case no css is loaded and the index html is more bare than expected and of providence that I can't figure out:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>react-hn</title>
  </head>
  <body>
    <div id="app"></div>
  <script type="text/javascript" src="/core.js"></script><script type="text/javascript" src="/app.js"></script></body>
</html>

I am running this on MacOS

$ npm --version
4.6.1
$ node --version
v6.10.3
@aleyan
Copy link
Author

aleyan commented Jun 9, 2017

Ok, I figured out how to get npm run serve working. The trouble was nwb was using its own default "index.html" to start the app with. I changed HtmlWebpackPlugin plugin to compile views/index.ejs to it instead in #85. Am I doing the right thing @insin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant