mirror of
https://github.com/captbaritone/webamp
synced 2024-11-23 00:34:42 +00:00
Generate reports when we deploy
This commit is contained in:
parent
3b9eb810cb
commit
c0e72ab31a
@ -1,6 +1,7 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
|
||||
|
||||
module.exports = {
|
||||
node: {
|
||||
@ -40,6 +41,11 @@ module.exports = {
|
||||
noParse: [/jszip\.js$/]
|
||||
},
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: "static",
|
||||
reportFilename: "library-report.html",
|
||||
openAnalyzer: false
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
"process.env": {
|
||||
NODE_ENV: JSON.stringify("production")
|
||||
|
@ -3,6 +3,8 @@ const merge = require("webpack-merge");
|
||||
const workboxPlugin = require("workbox-webpack-plugin");
|
||||
const GitRevisionPlugin = require("git-revision-webpack-plugin");
|
||||
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
|
||||
|
||||
const common = require("./webpack.common.js");
|
||||
|
||||
const gitRevisionPlugin = new GitRevisionPlugin();
|
||||
@ -10,6 +12,11 @@ const gitRevisionPlugin = new GitRevisionPlugin();
|
||||
const config = merge(common, {
|
||||
devtool: "source-map",
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: "static",
|
||||
reportFilename: "prod-report.html",
|
||||
openAnalyzer: false
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
"process.env": {
|
||||
NODE_ENV: JSON.stringify("production")
|
||||
|
Loading…
Reference in New Issue
Block a user