generated from PrismarineJS/prismarine-template
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Make dev builds faster (#227)"
- Loading branch information
Showing
3 changed files
with
28 additions
and
77 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
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,15 @@ | ||
const { merge } = require('webpack-merge') | ||
const common = require('./webpack.common.js') | ||
|
||
const CopyPlugin = require('copy-webpack-plugin') | ||
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin') | ||
const { CleanWebpackPlugin } = require('clean-webpack-plugin') | ||
const webpack = require('webpack') | ||
const WorkboxPlugin = require('workbox-webpack-plugin') | ||
|
||
module.exports = merge(common, { | ||
mode: 'production', | ||
plugins: [ | ||
new CleanWebpackPlugin(), | ||
new webpack.optimize.ModuleConcatenationPlugin(), | ||
new LodashModuleReplacementPlugin(), | ||
new CopyPlugin({ | ||
patterns: [ | ||
...common[Symbol.for('webpack_directories')], | ||
...common[Symbol.for('webpack_files')] | ||
] | ||
}), | ||
new WorkboxPlugin.GenerateSW({ | ||
// these options encourage the ServiceWorkers to get in there fast | ||
// and not allow any straggling "old" SWs to hang around | ||
clientsClaim: true, | ||
skipWaiting: true, | ||
include: ['index.html', 'manifest.json'] // not caching a lot as anyway this works only online | ||
}) | ||
new LodashModuleReplacementPlugin() | ||
] | ||
}) |