diff options
author | David Mehren | 2021-05-06 21:27:33 +0200 |
---|---|---|
committer | GitHub | 2021-05-06 21:27:33 +0200 |
commit | 4625276ef7bf1e195a61c3807e2abe57265bab74 (patch) | |
tree | f6a31d90fdf65c90e7a12f6fd36849c7d6d695d9 /webpack.prod.js | |
parent | c243859c45ec0282739166a4b0c3f556e571679c (diff) | |
parent | 41c86d1cf111b20c130688ef26a418a92b978f64 (diff) |
Merge pull request #1227 from hedgedoc/enhancement/esbuild
Use esbuild to minify frontend JS
Diffstat (limited to 'webpack.prod.js')
-rw-r--r-- | webpack.prod.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/webpack.prod.js b/webpack.prod.js index 5c523c06..92ee1578 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -1,8 +1,9 @@ const common = require('./webpack.common.js') const htmlexport = require('./webpack.htmlexport') -const { merge } = require('webpack-merge'); +const { merge } = require('webpack-merge') const path = require('path') const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') +const { ESBuildMinifyPlugin } = require('esbuild-loader') module.exports = [ merge(common, { @@ -11,6 +12,13 @@ module.exports = [ path: path.join(__dirname, 'public/build'), publicPath: 'build/', filename: '[name].[contenthash].js' + }, + optimization: { + minimizer: [ + new ESBuildMinifyPlugin({ + target: 'es2015' + }) + ] } }), merge(htmlexport, { |