Commit 75d37cbd authored by NGPixel's avatar NGPixel

feat: added offline-plugin

parent 63902907
......@@ -2,4 +2,5 @@
require('./scss/app.scss')
require('./js/compatibility.js')
require('offline-plugin/runtime').install()
require('./js/app.js')
......@@ -4,6 +4,7 @@ const merge = require('webpack-merge')
const CleanWebpackPlugin = require('clean-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OfflinePlugin = require('offline-plugin')
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin')
const common = require('./webpack.common.js')
......@@ -21,6 +22,17 @@ module.exports = merge(common, {
'process.env.NODE_ENV': JSON.stringify('production')
}),
new ExtractTextPlugin('css/bundle.css'),
new OfflinePlugin({
caches: {
main: [
'js/runtime.js',
'js/vendor.js',
'js/client.js'
],
additional: [':externals:'],
optional: ['*.chunk.js']
}
}),
new DuplicatePackageCheckerPlugin()
]
})
......@@ -177,6 +177,7 @@
"node-dev": "3.1.3",
"node-sass": "4.7.2",
"nodemon": "1.14.11",
"offline-plugin": "4.9.0",
"postcss-loader": "2.0.10",
"postcss-selector-parser": "3.1.1",
"progress-bar-webpack-plugin": "1.10.0",
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment