Skip to content

Commit

Permalink
fix(compiler-sfc): don't registerTS when bundling for browsers (#8582)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz authored Jun 15, 2023
1 parent 365184c commit 6f45f76
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/vue/compiler-sfc/index.browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@vue/compiler-sfc')
1 change: 1 addition & 0 deletions packages/vue/compiler-sfc/index.browser.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@vue/compiler-sfc'
10 changes: 10 additions & 0 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@
"./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"
}
},
Expand Down Expand Up @@ -99,5 +101,13 @@
"@vue/runtime-dom": "3.3.4",
"@vue/compiler-sfc": "3.3.4",
"@vue/server-renderer": "3.3.4"
},
"peerDependencies": {
"typescript": "*"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
}
4 changes: 3 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f45f76

Please sign in to comment.