Created
October 5, 2017 15:23
-
-
Save LeZuse/d79e17a934aa0878248544df2b2570d6 to your computer and use it in GitHub Desktop.
Restart Webpack on config change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ yarn start | |
yarn run v1.1.0 | |
$ nodemon | |
[nodemon] 1.12.1 | |
[nodemon] to restart at any time, enter `rs` | |
[nodemon] watching: webpack/webpack.config.js | |
[nodemon] starting `webpack-dev-server --config webpack/webpack.config.js` | |
Project is running at https://localhost:4201/ | |
webpack output is served from /assets/ | |
Content not from webpack is served from *** | |
Hash: bb03a7937a60dda34b0a | |
Version: webpack 3.6.0 | |
Time: 3268ms | |
Asset Size Chunks Chunk Names | |
main.js 2.95 MB 0 [emitted] [big] main | |
[115] multi (webpack)-dev-server/client?https://localhost:4201 ../app.js 40 bytes {0} [built] | |
[116] (webpack)-dev-server/client?https://localhost:4201 7.23 kB {0} [built] | |
[117] ***/node_modules/url/url.js 23.3 kB {0} [built] | |
[120] ***/node_modules/querystring-es3/index.js 127 bytes {0} [built] | |
[123] ***/node_modules/strip-ansi/index.js 161 bytes {0} [built] | |
[125] ***/node_modules/loglevel/lib/loglevel.js 7.74 kB {0} [built] | |
[126] (webpack)-dev-server/client/socket.js 1.04 kB {0} [built] | |
[158] (webpack)-dev-server/client/overlay.js 3.73 kB {0} [built] | |
[159] ***/node_modules/ansi-html/index.js 4.26 kB {0} [built] | |
[163] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built] | |
[165] (webpack)/hot/emitter.js 77 bytes {0} [built] | |
[167] ./app.js 562 bytes {0} [built] | |
[168] ***/node_modules/react/react.js 56 bytes {0} [built] | |
[184] ***/node_modules/react-dom/index.js 59 bytes {0} [built] | |
[185] ***/node_modules/react-dom/lib/ReactDOM.js 5.05 kB {0} [built] | |
+ 255 hidden modules | |
webpack: Compiled successfully. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"watch": "webpack/webpack.config.js", | |
"exec": "webpack-dev-server --config webpack/webpack.config.js" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"start": "nodemon", | |
}, | |
"devDependencies": { | |
"nodemon": "^1.12.1", | |
"webpack": "^3.6.0", | |
"webpack-dev-server": "^2.9.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THANK YOU .. this works like magic !
Combining this with LiveReload plugin to automate all reloading :)