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 = () => { const getOakInclude = () => {
return isEnvProduction return isEnvProduction
? [/oak-general-business/] ? [/oak-general-business/, /oak-frontend-base/]
: [ : [
/oak-domain/, /oak-domain/,
/oak-external-sdk/, /oak-external-sdk/,

View File

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