Skip to content

Commit ea027c9

Browse files
committed
Add dev-docs for webpack.
Signed-off-by: David Mehren <[email protected]>
1 parent 9f92bba commit ea027c9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/dev/webpack.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Webpack Docs
2+
## `webpack.common.js`
3+
This file contains all common definition for chunks and plugins, that are needed by the whole app.
4+
5+
**TODO:** Document which entry points are used for what.
6+
7+
## `webpack.htmlexport.js`
8+
Separate config for the "save as html" feature.
9+
Packs all CSS from `public/js/htmlExport.js` to `build/html.min.css`.
10+
This file is then downloaded by client-side JS and used to create the HTML.
11+
See `exportToHTML()` in `public/js/extra.js`.
12+
13+
14+
## `webpack.dev.js`
15+
The development config uses both common configs, enables development mode and enables "cheap" source maps (lines only).
16+
If you need more detailed source maps while developing, you might want to use the `source-maps` option.
17+
See https://webpack.js.org/configuration/devtool/ for details.
18+
19+
## `webpack.prod.js`
20+
The production config uses both common configs and enables production mode.
21+
This automatically enables various optimizations (e.g. UglifyJS). See https://webpack.js.org/concepts/mode/ for details.
22+
23+
For the global app config, the name of the emitted chunks is changed to include the content hash.
24+
See https://webpack.js.org/guides/caching/ on why this is a good idea.
25+
26+
For the HTML export config, CSS minification is enabled.

0 commit comments

Comments
 (0)