Browse Source

fix(nocodb): add terserOptions.keep_classnames

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
5855876451
  1. 9
      packages/nocodb/webpack.config.js
  2. 8
      packages/nocodb/webpack.local.config.js

9
packages/nocodb/webpack.config.js

@ -2,7 +2,6 @@ const path = require('path');
const nodeExternals = require('webpack-node-externals'); const nodeExternals = require('webpack-node-externals');
const webpack = require('webpack'); const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin');
//
const TerserPlugin = require('terser-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
module.exports = { module.exports = {
@ -24,7 +23,13 @@ module.exports = {
optimization: { optimization: {
minimize: true, //Update this to true or false minimize: true, //Update this to true or false
minimizer: [new TerserPlugin()], minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
},
}),
],
nodeEnv: false, nodeEnv: false,
}, },
externals: [nodeExternals()], externals: [nodeExternals()],

8
packages/nocodb/webpack.local.config.js

@ -23,7 +23,13 @@ module.exports = {
optimization: { optimization: {
minimize: true, //Update this to true or false minimize: true, //Update this to true or false
minimizer: [new TerserPlugin()], minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
},
}),
],
nodeEnv: false, nodeEnv: false,
}, },
externals: [ externals: [

Loading…
Cancel
Save