diff options
Diffstat (limited to 'build/webpack.base.conf.js')
| -rw-r--r-- | build/webpack.base.conf.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 7bba3a10..ea46ce6f 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -2,6 +2,7 @@ var path = require('path') var config = require('../config') var utils = require('./utils') var projectRoot = path.resolve(__dirname, '../') +var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin') var env = process.env.NODE_ENV // check env & config/index.js to decide weither to enable CSS Sourcemaps for the @@ -54,7 +55,7 @@ module.exports = { loader: 'vue' }, { - test: /\.js$/, + test: /\.jsx?$/, loader: 'babel', include: projectRoot, exclude: /node_modules\/(?!tributejs)/ @@ -91,5 +92,10 @@ module.exports = { browsers: ['last 2 versions'] }) ] - } + }, + plugins: [ + new ServiceWorkerWebpackPlugin({ + entry: path.join(__dirname, '..', 'src/sw.js') + }) + ] } |
