Reputation: 2039
My app uses Webpack and an Express server. Will I create problems if I run webpack --watch
in one terminal tab, and npm run watch
in another?
Is there a better way to auto-build after files change, and also refresh the server?
Upvotes: 0
Views: 273
Reputation: 2771
I guess it won't create any problem and if you make any changes in your component, webpack will automatically compile the changes and you need not refresh the server. Use this in your package.json
"scripts": {
"start": "webpack-dev-server --hot"
}
Install by using npm install webpack-dev-server
Hope it helps!
Upvotes: 1