Skip to content

Commit

Permalink
dep: update compression-webpack-plugin
Browse files Browse the repository at this point in the history
The commit replaces the forked depedency
`@theia/compression-webpack-plugin` which was not maintained in favor of
the upstream dependency at the latest version. The original dependency
was quite old, and contained security vulnerabilities. The `cache`
option was preserved as it is now supported directly by webpack.

Signed-off-by: vince-fugnitto <[email protected]>
  • Loading branch information
vince-fugnitto committed Nov 5, 2021
1 parent 39fe372 commit 7afe74e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 239 deletions.
2 changes: 1 addition & 1 deletion dev-packages/application-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@babel/plugin-transform-runtime": "^7.10.0",
"@babel/preset-env": "^7.10.0",
"@theia/application-package": "1.19.0",
"@theia/compression-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^9.0.0",
"@types/fs-extra": "^4.0.2",
"babel-loader": "^8.2.2",
"buffer": "^6.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const webpack = require('webpack');
const yargs = require('yargs');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const CompressionPlugin = require('@theia/compression-webpack-plugin')
const CompressionPlugin = require('compression-webpack-plugin')
const outputPath = path.resolve(__dirname, 'lib');
const { mode, staticCompression } = yargs.option('mode', {
Expand Down Expand Up @@ -88,10 +88,7 @@ const plugins = [
];
// it should go after copy-plugin in order to compress monaco as well
if (staticCompression) {
plugins.push(new CompressionPlugin({
// enable reuse of compressed artifacts for incremental development
cache: development
}));
plugins.push(new CompressionPlugin({}));
}
plugins.push(new CircularDependencyPlugin({
exclude: /(node_modules|examples)[\\\\|\/]./,
Expand All @@ -108,6 +105,7 @@ module.exports = {
path: outputPath
},
target: '${this.ifBrowser('web', 'electron-renderer')}',
cache: staticCompression,
module: {
rules: [
{
Expand Down
Loading

0 comments on commit 7afe74e

Please sign in to comment.