![]() LIVERELOAD CHROME CHANGE PORT CODEapp/javascripts/packs/main.jswill trigger a code rebuild and the updated in-memory ‘bundle. The following example Webpack configuration means that any changes in code dependency of. webpack-dev-server does not create any ‘bundle.js’ file in your local filesystem. Webpack-dev-server creates ‘bundle.js’ in memory from code pointed to by entry parameter, and serves it from the url path specified by publicPath parameter. Makeyour tag point to the webpack-dev-server in-memory ‘bundle.js’, which is served from the url path specified by publicPath. Your html page tag is not pointing to webpack-dev-server in-memory generated ‘bundle.js’, but rather to a static ‘bundle.js’ exposed by contentBase and served statically from your local filesystem. Manually reloading the web page does not reflect code change. Q5: When I modify javascript files, I do not see changes to bundle.js in the local filesystem, nor bundle.js file pointed to by html page tag. Thanks to Daniel Sobota’s question, I’ll also show what the sample directory structure looks like: Relative path is relative to where the Webpack config file is located. NOTE: We show examples of absolute ( entry/app) and relative path ( output/path, contentBase) configuration. Read the comments carefully to understand each configuration parameter. This webpack-dev-server ‘live-reload’ configuration should work for everyone. Q1: Why can’t I find example webpack-dev-server configuration to set up ‘live-reload’? Webpack-dev-server Live-Reload Burning Questions
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |