chore: typo isBunlderESMBuild in rollup.config.js (#195)
This commit is contained in:
parent
e6d0d08a43
commit
4f87d1d486
@ -74,7 +74,7 @@ function createConfig(output, plugins = []) {
|
|||||||
const isProductionBuild =
|
const isProductionBuild =
|
||||||
process.env.__DEV__ === 'false' || /\.prod\.js$/.test(output.file)
|
process.env.__DEV__ === 'false' || /\.prod\.js$/.test(output.file)
|
||||||
const isGlobalBuild = /\.global(\.prod)?\.js$/.test(output.file)
|
const isGlobalBuild = /\.global(\.prod)?\.js$/.test(output.file)
|
||||||
const isBunlderESMBuild = /\.esm\.js$/.test(output.file)
|
const isBundlerESMBuild = /\.esm\.js$/.test(output.file)
|
||||||
const isBrowserESMBuild = /esm-browser(\.prod)?\.js$/.test(output.file)
|
const isBrowserESMBuild = /esm-browser(\.prod)?\.js$/.test(output.file)
|
||||||
|
|
||||||
if (isGlobalBuild) {
|
if (isGlobalBuild) {
|
||||||
@ -118,7 +118,7 @@ function createConfig(output, plugins = []) {
|
|||||||
aliasPlugin,
|
aliasPlugin,
|
||||||
createReplacePlugin(
|
createReplacePlugin(
|
||||||
isProductionBuild,
|
isProductionBuild,
|
||||||
isBunlderESMBuild,
|
isBundlerESMBuild,
|
||||||
(isGlobalBuild || isBrowserESMBuild) &&
|
(isGlobalBuild || isBrowserESMBuild) &&
|
||||||
!packageOptions.enableNonBrowserBranches
|
!packageOptions.enableNonBrowserBranches
|
||||||
),
|
),
|
||||||
@ -133,10 +133,10 @@ function createConfig(output, plugins = []) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createReplacePlugin(isProduction, isBunlderESMBuild, isBrowserBuild) {
|
function createReplacePlugin(isProduction, isBundlerESMBuild, isBrowserBuild) {
|
||||||
return replace({
|
return replace({
|
||||||
__COMMIT__: `"${process.env.COMMIT}"`,
|
__COMMIT__: `"${process.env.COMMIT}"`,
|
||||||
__DEV__: isBunlderESMBuild
|
__DEV__: isBundlerESMBuild
|
||||||
? // preserve to be handled by bundlers
|
? // preserve to be handled by bundlers
|
||||||
`process.env.NODE_ENV !== 'production'`
|
`process.env.NODE_ENV !== 'production'`
|
||||||
: // hard coded dev/prod builds
|
: // hard coded dev/prod builds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user