wip
This commit is contained in:
+3
-2
@@ -66,6 +66,7 @@ function createConfig(format, output, plugins = []) {
|
|||||||
output.banner = banner
|
output.banner = banner
|
||||||
output.externalLiveBindings = false
|
output.externalLiveBindings = false
|
||||||
output.globals = { vue: 'Vue' }
|
output.globals = { vue: 'Vue' }
|
||||||
|
output.exports = 'named'
|
||||||
|
|
||||||
const isProductionBuild = /\.prod\.js$/.test(output.file)
|
const isProductionBuild = /\.prod\.js$/.test(output.file)
|
||||||
const isGlobalBuild = format === 'global'
|
const isGlobalBuild = format === 'global'
|
||||||
@@ -139,9 +140,9 @@ function createReplacePlugin(
|
|||||||
__VERSION__: `"${pkg.version}"`,
|
__VERSION__: `"${pkg.version}"`,
|
||||||
__DEV__: isBundlerESMBuild
|
__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
|
||||||
!isProduction,
|
!isProduction,
|
||||||
// this is only used during tests
|
// this is only used during tests
|
||||||
__TEST__: isBundlerESMBuild ? `(process.env.NODE_ENV === 'test')` : false,
|
__TEST__: isBundlerESMBuild ? `(process.env.NODE_ENV === 'test')` : false,
|
||||||
// If the build is expected to run directly in the browser (global / esm builds)
|
// If the build is expected to run directly in the browser (global / esm builds)
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
|
|
||||||
"target": "esnext",
|
"target": "es2019",
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"allowJs": false,
|
"allowJs": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user