summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-10-10 23:38:13 +0200
committerGitHub2018-10-10 23:38:13 +0200
commitbf525e43d4b1806b0a99f7c145a16087de7438fa (patch)
treebcb2a81120b3754e819db654ef7a5d7c7051d884 /docs
parentc7478c1694be2b3b880b8d52f9c15d60832a06f8 (diff)
parent7eed584c0197d0b5a93f58f8b645c0b84588d8e1 (diff)
Merge pull request #1007 from davidmehren/webpack-4
Webpack 4 refactor & docs
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/webpack.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/dev/webpack.md b/docs/dev/webpack.md
new file mode 100644
index 00000000..7b391f3a
--- /dev/null
+++ b/docs/dev/webpack.md
@@ -0,0 +1,26 @@
+# Webpack Docs
+## `webpack.common.js`
+This file contains all common definition for chunks and plugins, that are needed by the whole app.
+
+**TODO:** Document which entry points are used for what.
+
+## `webpack.htmlexport.js`
+Separate config for the "save as html" feature.
+Packs all CSS from `public/js/htmlExport.js` to `build/html.min.css`.
+This file is then downloaded by client-side JS and used to create the HTML.
+See `exportToHTML()` in `public/js/extra.js`.
+
+
+## `webpack.dev.js`
+The development config uses both common configs, enables development mode and enables "cheap" source maps (lines only).
+If you need more detailed source maps while developing, you might want to use the `source-maps` option.
+See https://webpack.js.org/configuration/devtool/ for details.
+
+## `webpack.prod.js`
+The production config uses both common configs and enables production mode.
+This automatically enables various optimizations (e.g. UglifyJS). See https://webpack.js.org/concepts/mode/ for details.
+
+For the global app config, the name of the emitted chunks is changed to include the content hash.
+See https://webpack.js.org/guides/caching/ on why this is a good idea.
+
+For the HTML export config, CSS minification is enabled.