fix(compiler-sfc): don't registerTS when bundling for browsers (#8582)

This commit is contained in:
三咲智子 Kevin Deng 2023-06-15 16:35:41 +08:00 committed by GitHub
parent 365184c93e
commit 6f45f76df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1 @@
module.exports = require('@vue/compiler-sfc')

View File

@ -0,0 +1 @@
export * from '@vue/compiler-sfc'

View File

@ -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"
}
},
@ -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
}
}
}

View 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==}