Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

25
webpack Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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 JavaScript file (this uses the CSS loader for `.css` files):
`webpack {{app.js}} {{bundle.js}} --module-bind '{{css=css}}'`
- Pass a configuration file (with e.g. 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}}`