Skip to content

Commit 37059c3

Browse files
authored
fix dayjs is not excluded in dist (#6767)
1 parent 4fe57fa commit 37059c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

webpack.build.conf.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ function addLocales(webpackConfig) {
1414
}
1515

1616
function externalDayjs(config) {
17-
config.externals.dayjs = {
17+
config.externals.push({
1818
dayjs: {
1919
root: 'dayjs',
2020
commonjs2: 'dayjs',
2121
commonjs: 'dayjs',
2222
amd: 'dayjs',
23+
module: 'dayjs',
2324
},
24-
};
25+
});
2526
config.externals.push(function ({ _context, request }, callback) {
2627
if (/^dayjs\/plugin\//.test(request)) {
2728
const name = request.replace(/\//g, '_');
@@ -30,6 +31,7 @@ function externalDayjs(config) {
3031
commonjs2: name,
3132
commonjs: name,
3233
amd: name,
34+
module: name,
3335
});
3436
}
3537
callback();

0 commit comments

Comments
 (0)