build: esm-bunlder builds should be considered browser builds
This commit is contained in:
parent
a894a350cd
commit
9550302df4
@ -60,7 +60,7 @@ let _parse: typeof parse
|
|||||||
let _walk: typeof walk
|
let _walk: typeof walk
|
||||||
|
|
||||||
export function loadDep(name: string) {
|
export function loadDep(name: string) {
|
||||||
if (typeof process !== 'undefined' && isFunction(require)) {
|
if (!__BROWSER__ && typeof process !== 'undefined' && isFunction(require)) {
|
||||||
return require(name)
|
return require(name)
|
||||||
} else {
|
} else {
|
||||||
// This is only used when we are building a dev-only build of the compiler
|
// This is only used when we are building a dev-only build of the compiler
|
||||||
|
@ -114,7 +114,7 @@ function createConfig(output, plugins = []) {
|
|||||||
createReplacePlugin(
|
createReplacePlugin(
|
||||||
isProductionBuild,
|
isProductionBuild,
|
||||||
isBundlerESMBuild,
|
isBundlerESMBuild,
|
||||||
(isGlobalBuild || isRawESMBuild) &&
|
(isGlobalBuild || isRawESMBuild || isBundlerESMBuild) &&
|
||||||
!packageOptions.enableNonBrowserBranches,
|
!packageOptions.enableNonBrowserBranches,
|
||||||
isRuntimeCompileBuild
|
isRuntimeCompileBuild
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user