How to use webpack for development without webpack dev server?

I am currently using require.js for development, so I can quickly iterate (change the file, refresh the page, not build a step between them), but I use webpack as a build tool, since it is superior to r.js , I would like to get rid of require.js completely and use webpack as a script loader in development. I know what exactly is for webpack dev server , but I specifically do not want to use it.

Ideally, I would just include some kind of webpack loader in <script> , name it in the webpack.js build webpack.js and let it complete the task.

+6
source share
1 answer

If you do not want to use the webpack-dev server, you can use the web chat functionality to continue creating the script as you make changes. This will give you the workflow you are looking for. In index.html you will include only your package and without a loader.

http://webpack.imtqy.com/docs/tutorials/getting-started/#watch-mode

+6
source

Source: https://habr.com/ru/post/979801/


All Articles