diff --git a/packages/webpack5/src/configuration/base.ts b/packages/webpack5/src/configuration/base.ts index db3cb003a9..1345be3473 100644 --- a/packages/webpack5/src/configuration/base.ts +++ b/packages/webpack5/src/configuration/base.ts @@ -132,6 +132,10 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { .globalObject('global') .set('clean', true); + if (env?.uniqueBundle) { + config.output.filename(`[name].${env.uniqueBundle}.js`); + } + config.watchOptions({ ignored: [ `${getProjectFilePath(env.buildPath ?? 'platforms')}/**`,