Skip to content

Commit

Permalink
build: fix compat build type treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 8, 2021
1 parent 341fa38 commit f2fb8a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/vue-compat/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../api-extractor.json",
"mainEntryPointFilePath": "./dist/packages/<unscopedPackageName>/src/index.d.ts",
"mainEntryPointFilePath": "./dist/packages/vue-compat/src/index.d.ts",
"dtsRollup": {
"publicTrimmedFilePath": "./dist/<unscopedPackageName>.d.ts"
"publicTrimmedFilePath": "./dist/vue.d.ts"
}
}
1 change: 0 additions & 1 deletion packages/vue-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"description": "Vue 3 compatibility build for Vue 2",
"main": "index.js",
"module": "dist/vue.runtime.esm-bundler.js",
"types": "dist/vue.d.ts",
"unpkg": "dist/vue.global.js",
"jsdelivr": "dist/vue.global.js",
"files": [
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function createConfig(format, output, plugins = []) {
process.exit(1)
}

output.exports = 'auto'
output.sourcemap = !!process.env.SOURCE_MAP
output.externalLiveBindings = false

Expand All @@ -97,7 +98,8 @@ function createConfig(format, output, plugins = []) {
output.name = packageOptions.name
}

const shouldEmitDeclarations = process.env.TYPES != null && !hasTSChecked
const shouldEmitDeclarations =
pkg.types && process.env.TYPES != null && !hasTSChecked

const tsPlugin = ts({
check: process.env.NODE_ENV === 'production' && !hasTSChecked,
Expand Down

0 comments on commit f2fb8a5

Please sign in to comment.