oak-frontend-base 对外输出的是 CommonJS 类型源码,使用sourceType:unambiguous

This commit is contained in:
Wang Kejun 2022-08-17 09:40:09 +08:00
parent 9e02005c89
commit 0b69a6ff3a
2 changed files with 8 additions and 2 deletions

View File

@ -91,7 +91,7 @@ module.exports = function (webpackEnv) {
const getOakInclude = () => {
return isEnvProduction
? [/oak-general-business/]
? [/oak-general-business/, /oak-frontend-base/]
: [
/oak-domain/,
/oak-external-sdk/,

View File

@ -206,7 +206,7 @@ module.exports = function (webpackEnv) {
const getOakInclude = () => {
return isEnvProduction
? [/oak-general-business/]
? [/oak-general-business/, /oak-frontend-base/]
: [
/oak-domain/,
/oak-external-sdk/,
@ -507,6 +507,12 @@ module.exports = function (webpackEnv) {
// See #6846 for context on why cacheCompression is disabled
cacheCompression: false,
compact: isEnvProduction,
overrides: [
{
include: /oak-frontend-base/,
sourceType: 'unambiguous',
},
],
},
},
],