]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-sfc): don't registerTS when bundling for browsers (#8582)
author三咲智子 Kevin Deng <sxzz@sxzz.moe>
Thu, 15 Jun 2023 08:35:41 +0000 (16:35 +0800)
committerGitHub <noreply@github.com>
Thu, 15 Jun 2023 08:35:41 +0000 (16:35 +0800)
packages/vue/compiler-sfc/index.browser.js [new file with mode: 0644]
packages/vue/compiler-sfc/index.browser.mjs [new file with mode: 0644]
packages/vue/package.json
pnpm-lock.yaml

diff --git a/packages/vue/compiler-sfc/index.browser.js b/packages/vue/compiler-sfc/index.browser.js
new file mode 100644 (file)
index 0000000..774f9da
--- /dev/null
@@ -0,0 +1 @@
+module.exports = require('@vue/compiler-sfc')
diff --git a/packages/vue/compiler-sfc/index.browser.mjs b/packages/vue/compiler-sfc/index.browser.mjs
new file mode 100644 (file)
index 0000000..3c30abc
--- /dev/null
@@ -0,0 +1 @@
+export * from '@vue/compiler-sfc'
index 0f41b3f62209b1e8d99f1f6673005d863ebbf971..7627b60caa8cc315f504f2e863758002f3ddf244 100644 (file)
     "./compiler-sfc": {
       "import": {
         "types": "./compiler-sfc/index.d.mts",
+        "browser": "./compiler-sfc/index.browser.mjs",
         "default": "./compiler-sfc/index.mjs"
       },
       "require": {
         "types": "./compiler-sfc/index.d.ts",
+        "browser": "./compiler-sfc/index.browser.js",
         "default": "./compiler-sfc/index.js"
       }
     },
     "@vue/runtime-dom": "3.3.4",
     "@vue/compiler-sfc": "3.3.4",
     "@vue/server-renderer": "3.3.4"
+  },
+  "peerDependencies": {
+    "typescript": "*"
+  },
+  "peerDependenciesMeta": {
+    "typescript": {
+      "optional": true
+    }
   }
 }
index ea58fdc70662071deaa024ca0a4af43bab1f97a9..ea36e5476313f7d48661c2751f003384e4bcc80d 100644 (file)
@@ -386,6 +386,9 @@ importers:
       '@vue/shared':
         specifier: 3.3.4
         version: link:../shared
+      typescript:
+        specifier: '*'
+        version: 5.0.2
 
   packages/vue-compat:
     dependencies:
@@ -5410,7 +5413,6 @@ packages:
     resolution: {integrity: sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==}
     engines: {node: '>=12.20'}
     hasBin: true
-    dev: true
 
   /ufo@1.1.1:
     resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==}