Browse Source

Adds bundle analysis for webviews

Removes JSON5
main
Eric Amodio 2 years ago
parent
commit
c873cba3f3
3 changed files with 11 additions and 9 deletions
  1. +0
    -1
      package.json
  2. +6
    -3
      webpack.config.js
  3. +5
    -5
      yarn.lock

+ 0
- 1
package.json View File

@ -13094,7 +13094,6 @@
"html-loader": "4.2.0",
"html-webpack-plugin": "5.5.0",
"image-minimizer-webpack-plugin": "3.8.1",
"json5": "2.2.3",
"license-checker-rseidelsohn": "4.1.1",
"mini-css-extract-plugin": "2.7.2",
"mocha": "10.2.0",

+ 6
- 3
webpack.config.js View File

@ -2,6 +2,7 @@
/** @typedef {import('webpack').Configuration} WebpackConfig **/
const { spawnSync } = require('child_process');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const CircularDependencyPlugin = require('circular-dependency-plugin');
const { CleanWebpackPlugin: CleanPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
@ -12,15 +13,13 @@ const ForkTsCheckerPlugin = require('fork-ts-checker-webpack-plugin');
const fs = require('fs');
const HtmlPlugin = require('html-webpack-plugin');
const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin');
const JSON5 = require('json5');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
const { validate } = require('schema-utils');
const TerserPlugin = require('terser-webpack-plugin');
const { WebpackError, webpack, optimize } = require('webpack');
const { WebpackError, optimize } = require('webpack');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const { EsbuildPlugin } = require('esbuild-loader');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports =
/**
@ -341,6 +340,10 @@ function getWebviewsConfig(mode, env) {
);
}
if (env.analyzeBundle) {
plugins.push(new BundleAnalyzerPlugin({ analyzerPort: 'auto' }));
}
return {
name: 'webviews',
context: basePath,

+ 5
- 5
yarn.lock View File

@ -4276,11 +4276,6 @@ json-stable-stringify-without-jsonify@^1.0.1:
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
json5@2.2.3, json5@^2.1.2:
version "2.2.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
json5@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
@ -4288,6 +4283,11 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
json5@^2.1.2:
version "2.2.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"

||||||
x
 
000:0
Loading…
Cancel
Save