Skip to content

Commit 6f45f76

Browse files
authored
fix(compiler-sfc): don't registerTS when bundling for browsers (#8582)
1 parent 365184c commit 6f45f76

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@vue/compiler-sfc')
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '@vue/compiler-sfc'

packages/vue/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@
4444
"./compiler-sfc": {
4545
"import": {
4646
"types": "./compiler-sfc/index.d.mts",
47+
"browser": "./compiler-sfc/index.browser.mjs",
4748
"default": "./compiler-sfc/index.mjs"
4849
},
4950
"require": {
5051
"types": "./compiler-sfc/index.d.ts",
52+
"browser": "./compiler-sfc/index.browser.js",
5153
"default": "./compiler-sfc/index.js"
5254
}
5355
},
@@ -99,5 +101,13 @@
99101
"@vue/runtime-dom": "3.3.4",
100102
"@vue/compiler-sfc": "3.3.4",
101103
"@vue/server-renderer": "3.3.4"
104+
},
105+
"peerDependencies": {
106+
"typescript": "*"
107+
},
108+
"peerDependenciesMeta": {
109+
"typescript": {
110+
"optional": true
111+
}
102112
}
103113
}

pnpm-lock.yaml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)