diff options
author | vmishenev <vad-mishenev@yandex.ru> | 2021-11-29 04:20:31 +0300 |
---|---|---|
committer | Vadim Mishenev <vad-mishenev@yandex.ru> | 2021-11-29 14:29:27 +0300 |
commit | 35a69e0322fcd271dccadcc2ee8cbb61dcafe62e (patch) | |
tree | 15ec76db01797f864d574c1fa89f246f450324eb /plugins/base/frontend/webpack.config.js | |
parent | f144d055403d3101170b3fe075915205762293c4 (diff) | |
download | dokka-35a69e0322fcd271dccadcc2ee8cbb61dcafe62e.tar.gz dokka-35a69e0322fcd271dccadcc2ee8cbb61dcafe62e.tar.bz2 dokka-35a69e0322fcd271dccadcc2ee8cbb61dcafe62e.zip |
Update npm deps, node (#2251)
Diffstat (limited to 'plugins/base/frontend/webpack.config.js')
-rw-r--r-- | plugins/base/frontend/webpack.config.js | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/plugins/base/frontend/webpack.config.js b/plugins/base/frontend/webpack.config.js index fe93ed4f..dde701b3 100644 --- a/plugins/base/frontend/webpack.config.js +++ b/plugins/base/frontend/webpack.config.js @@ -2,17 +2,12 @@ const {join, resolve} = require('path'); const ringUiWebpackConfig = require('@jetbrains/ring-ui/webpack.config'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const TerserPlugin = require("terser-webpack-plugin"); const pkgConfig = require('./package.json').config; const componentsPath = join(__dirname, pkgConfig.components); -// Patch @jetbrains/ring-ui svg-sprite-loader config -ringUiWebpackConfig.loaders.svgInlineLoader.include.push( - require('@jetbrains/logos'), - require('@jetbrains/icons') -); - const webpackConfig = () => ({ entry: `${componentsPath}/root.tsx`, resolve: { @@ -53,6 +48,12 @@ const webpackConfig = () => ({ } } ] + }, + { + test: /\.svg$/, + loader: require.resolve('svg-inline-loader'), + options: {removeSVGTagAttrs: false}, + include: [require('@jetbrains/icons')] } ] }, @@ -64,9 +65,15 @@ const webpackConfig = () => ({ chunkFilename: '[id].css', }), ], + optimization: { + minimize: true, + minimizer: [new TerserPlugin({ + extractComments: false, + })], + }, output: { path: __dirname + '/dist/' } }); -module.exports = webpackConfig; +module.exports = webpackConfig;
\ No newline at end of file |