]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
build: fix compat build type treatment
authorEvan You <yyx990803@gmail.com>
Sat, 8 May 2021 20:21:06 +0000 (16:21 -0400)
committerEvan You <yyx990803@gmail.com>
Sat, 8 May 2021 20:21:06 +0000 (16:21 -0400)
packages/vue-compat/api-extractor.json
packages/vue-compat/package.json
rollup.config.js

index a8982eb0941677fd887b059dbd979ec1da542517..0d93326a8fff2cf86ba69438014fb7d6a16dc87e 100644 (file)
@@ -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"
   }
 }
\ No newline at end of file
index 205b3fec6e447389fda630a356b7d7d27047a9b6..fbd3b3f2d4faa29bf55f40aaaa33b25f2ac4a38b 100644 (file)
@@ -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": [
index d785735e8bf1cecb6b56a792e64d5ff355de5042..6bcbd1e679863d4d10a248e5057678e9397eb035 100644 (file)
@@ -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,