feat(plugin-infra): support esm bundler (#3460)

This commit is contained in:
Alex Yang
2023-07-29 12:07:32 -07:00
committed by GitHub
parent 6388a798c9
commit 0b66e911b1
10 changed files with 191 additions and 103 deletions
+5 -1
View File
@@ -32,6 +32,7 @@ const OptimizeOptionOptions: (
minimizer: [
new TerserPlugin({
minify: TerserPlugin.swcMinify,
exclude: [/\.min\.js$/, /plugins\/.+\/.+\.mjs$/],
parallel: true,
extractComments: true,
terserOptions: {
@@ -269,7 +270,10 @@ export const createConfiguration: (
}),
new CopyPlugin({
patterns: [
{ from: resolve(rootPath, 'public'), to: resolve(rootPath, 'dist') },
{
from: resolve(rootPath, 'public'),
to: resolve(rootPath, 'dist'),
},
],
}),
],