Files
realtime-oepnv-tracker/webpack/prod.js
T
2020-10-02 20:49:20 +02:00

67 lines
1.8 KiB
JavaScript

/*
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>.
* All rights reserved.
*/
const {merge} = require('webpack-merge');
const path = require("path");
const base = require("./base");
const TerserPlugin = require("terser-webpack-plugin");
const WorkboxPlugin = require('workbox-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
module.exports = merge(base, {
mode: "production",
output: {
filename: "bundle.min.js"
},
devtool: false,
performance: {
maxEntrypointSize: 900000,
maxAssetSize: 900000
},
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
output: {
comments: false
}
}
})
]
},
plugins: [
new WorkboxPlugin.GenerateSW({
clientsClaim: true,
skipWaiting: true,
}),
new FaviconsWebpackPlugin({
logo: './map.png',
publicPath: "./",
favicons: {
manifestRelativePaths: true,
start_url: "../",
appName: 'RealTime Delbus',
appDescription: 'Real-Time Delbus Map',
appShortName: "RealTime Delbus",
developerName: 'syma.dev',
developerURL: "https://syma.dev",
background: '#000',
theme_color: '#333',
logging: false,
icons: {
android: true,
appleIcon: true,
appleStartup: false,
coast: false,
favicons: true,
firefox: true,
windows: true,
yandex: false
}
}
})
]
});