build: improve webpack config (#3463)

This commit is contained in:
Alex Yang
2023-07-29 23:34:52 -07:00
committed by GitHub
parent 05865d51c6
commit cc7de52caf
5 changed files with 33 additions and 9 deletions

View File

@@ -14,15 +14,20 @@ export default async function (cli_env: any, _: any) {
const config = createConfiguration(flags, runtimeConfig);
return merge(config, {
entry: {
index: {
'polyfill-ses': {
asyncChunks: false,
import: resolve(rootPath, 'src/index.tsx'),
import: resolve(rootPath, 'src/polyfill/ses.ts'),
},
plugin: {
dependOn: ['index'],
asyncChunks: true,
dependOn: ['polyfill-ses'],
import: resolve(rootPath, 'src/bootstrap/register-plugins.ts'),
},
index: {
asyncChunks: false,
dependOn: ['polyfill-ses', 'plugin'],
import: resolve(rootPath, 'src/index.tsx'),
},
},
});
}