mirror of
https://github.com/generativefm/generative.fm.git
synced 2026-01-09 14:48:14 -05:00
23 lines
527 B
JavaScript
23 lines
527 B
JavaScript
'use strict';
|
|
|
|
const OfflinePlugin = require('offline-plugin');
|
|
const configPromise = require('./webpack.config');
|
|
|
|
const getConfig = configPromise.then(config => {
|
|
config.mode = 'production';
|
|
delete config.devtool;
|
|
config.plugins.push(
|
|
new OfflinePlugin({
|
|
appShell: '/',
|
|
externals: ['favicon.ico', 'https://platform.twitter.com/widgets.js'],
|
|
autoUpdate: true,
|
|
ServiceWorker: {
|
|
events: true,
|
|
},
|
|
})
|
|
);
|
|
return config;
|
|
});
|
|
|
|
module.exports = getConfig;
|