diff --git a/packages/vue-compat/api-extractor.json b/packages/vue-compat/api-extractor.json index a8982eb0..0d93326a 100644 --- a/packages/vue-compat/api-extractor.json +++ b/packages/vue-compat/api-extractor.json @@ -1,7 +1,7 @@ { "extends": "../../api-extractor.json", - "mainEntryPointFilePath": "./dist/packages//src/index.d.ts", + "mainEntryPointFilePath": "./dist/packages/vue-compat/src/index.d.ts", "dtsRollup": { - "publicTrimmedFilePath": "./dist/.d.ts" + "publicTrimmedFilePath": "./dist/vue.d.ts" } } \ No newline at end of file diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index 205b3fec..fbd3b3f2 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -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": [ diff --git a/rollup.config.js b/rollup.config.js index d785735e..6bcbd1e6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -81,6 +81,7 @@ function createConfig(format, output, plugins = []) { process.exit(1) } + output.exports = 'auto' output.sourcemap = !!process.env.SOURCE_MAP output.externalLiveBindings = false @@ -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,