From f080073fad627dabab934e8498c0851884521617 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 8 Jul 2016 15:10:36 +0530 Subject: [PATCH] webpack: add page (#940) --- pages/common/webpack.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/webpack.md diff --git a/pages/common/webpack.md b/pages/common/webpack.md new file mode 100644 index 000000000..af536272d --- /dev/null +++ b/pages/common/webpack.md @@ -0,0 +1,19 @@ +# webpack + +> Bundle a web project's js files and other assets into a single output file. + +- Create a single output file from an entry point file: + +`webpack {{app.js}} {{bundle.js}}` + +- Load css files too from the js file (this uses the css loader for .css files): + +`webpack {{app.js}} {{bundle.js}} --module-bind 'css=css'` + +- Pass a config file (with eg. the entry script and the output filename) and show compilation progress: + +`webpack --config {{webpack.config.js}} --progress` + +- Automatically recompile on changes to project files: + +`webpack --watch {{app.js}} {{bundle.js}}`