mirror of
https://github.com/morten-olsen/parcel.git
synced 2026-02-08 01:36:24 +01:00
update
This commit is contained in:
@@ -2,7 +2,9 @@ import { Configuration } from 'webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import SriPlugin from 'webpack-subresource-integrity';
|
||||
import path from 'path';
|
||||
import WebpackPwaManifest from 'webpack-pwa-manifest';
|
||||
|
||||
const data = require('./data.json');
|
||||
const OfflinePlugin = require('offline-plugin');
|
||||
|
||||
const __DEV__ = process.env.NODE_ENV !== 'production';
|
||||
@@ -25,16 +27,19 @@ const config: Configuration = {
|
||||
'react-dom': '@hot-loader/react-dom',
|
||||
},
|
||||
},
|
||||
optimization: {
|
||||
usedExports: true,
|
||||
},
|
||||
plugins: [
|
||||
new WebpackPwaManifest({
|
||||
name: `Parcel for ${data.username}`,
|
||||
short_name: 'parcel',
|
||||
background_color: '#ffffff',
|
||||
crossorigin: 'anonymous',
|
||||
}),
|
||||
new SriPlugin({
|
||||
hashFuncNames: ['sha256', 'sha384'],
|
||||
enabled: !__DEV__,
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Parcel',
|
||||
title: `Parcel for ${data.username}`,
|
||||
minify: true,
|
||||
template: path.join(__dirname, 'html.html'),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user