1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 17:22:08 +02:00
tldr/pages/common/webpack.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

20 lines
630 B
Markdown

# webpack
> Bundle a web project's js files and other assets into a single output file.
> More information: <https://webpack.js.org>.
- 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}}`