mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-12 02:07:26 +01:00
21 lines
568 B
JavaScript
21 lines
568 B
JavaScript
const config = require('sapper/config/webpack.js')
|
|
const terser = require('./terser.config')
|
|
const webpack = require('webpack')
|
|
|
|
const isDev = config.dev
|
|
|
|
module.exports = {
|
|
entry: config.serviceworker.entry(),
|
|
output: config.serviceworker.output(),
|
|
mode: process.env.NODE_ENV,
|
|
devtool: isDev ? 'inline-source-map' : 'source-map',
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
'process.browser': true,
|
|
'process.env.NODE_ENV': '"production"',
|
|
'process.env.SAPPER_TIMESTAMP': process.env.SAPPER_TIMESTAMP || Date.now()
|
|
}),
|
|
terser()
|
|
]
|
|
}
|