mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-10 16:53:10 +02:00
webpack: add page (#940)
This commit is contained in:
parent
37d2e6b393
commit
f080073fad
1 changed files with 19 additions and 0 deletions
19
pages/common/webpack.md
Normal file
19
pages/common/webpack.md
Normal file
|
@ -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}}`
|
Loading…
Add table
Reference in a new issue