Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are a bunch of dead issues (#63, #90, #13, #48) and a dead PR (#81) for production builds so I thought I would put forward my effort. I tried to make it as simple and non-intrusive as possible, but
rimraf
,cross-env
andcopyfiles
are required for the build to work across other environments (ie Windows).The only weirdness is having to use
static/bundle.js
as theoutput.filename
to ensure thatbundle.js
gets put into the/dist/static
folder. This is so the reference to the bundle inindex.html
remains correct and we can simply copy the file intodist
. Alternatively we could use html-webpack-plugin but it seems rather heavy for what should be a simple boilerplate.The production config is essentially a copy of the development config but with:
devtool: 'source-map'
src/index.js
entry fileUglifyJsPlugin
for minification instead of all the dev plugins