Skip to content

Commit f2fb8a5

Browse files
committed
build: fix compat build type treatment
1 parent 341fa38 commit f2fb8a5

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../api-extractor.json",
3-
"mainEntryPointFilePath": "./dist/packages/<unscopedPackageName>/src/index.d.ts",
3+
"mainEntryPointFilePath": "./dist/packages/vue-compat/src/index.d.ts",
44
"dtsRollup": {
5-
"publicTrimmedFilePath": "./dist/<unscopedPackageName>.d.ts"
5+
"publicTrimmedFilePath": "./dist/vue.d.ts"
66
}
77
}

packages/vue-compat/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"description": "Vue 3 compatibility build for Vue 2",
55
"main": "index.js",
66
"module": "dist/vue.runtime.esm-bundler.js",
7-
"types": "dist/vue.d.ts",
87
"unpkg": "dist/vue.global.js",
98
"jsdelivr": "dist/vue.global.js",
109
"files": [

rollup.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function createConfig(format, output, plugins = []) {
8181
process.exit(1)
8282
}
8383

84+
output.exports = 'auto'
8485
output.sourcemap = !!process.env.SOURCE_MAP
8586
output.externalLiveBindings = false
8687

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

100-
const shouldEmitDeclarations = process.env.TYPES != null && !hasTSChecked
101+
const shouldEmitDeclarations =
102+
pkg.types && process.env.TYPES != null && !hasTSChecked
101103

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

0 commit comments

Comments
 (0)