Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David Mehren <dmehren1@gmail.com>
- Loading branch information
1 parent
9f92bba
commit ea027c9
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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. |