Thursday, 8 June 2017

Minimum Node.js + Webpack setup for development and production

How does a minimum Node.js + Webpack setup look like where the development setup supports hot reloading using webpack-dev-server, which appears to require an index.html file containing:

<script src="http://localhost:8080/webpack-dev-server.js"></script>
<script src="http://localhost:8080/dist/app.bundle.js"></script>

and a production setup using webpack -p, which appears to require an index.html file containing:

<script src="dist/app.bundle.js"></script>



via maasha

No comments:

Post a Comment