Skip to content

Commit d04498e

Browse files
add flutter support on prodcution build
1 parent a9db4e1 commit d04498e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

editor/next.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const TerserPlugin = require("terser-webpack-plugin");
12
const withTM = require("next-transpile-modules")([
23
// region @editor-app
34
"@editor-app/live-session",
@@ -99,6 +100,13 @@ module.exports = withTM({
99100
test: /\.mjs$/,
100101
include: /node_modules/,
101102
});
103+
104+
const terser = config.optimization.minimizer.find(
105+
(m) => m.constructor.name === "TerserPlugin"
106+
);
107+
// for @flutter-builder classname issue
108+
terser.options.terserOptions.keep_classnames = true;
109+
102110
return config;
103111
},
104112
async redirects() {

0 commit comments

Comments
 (0)