@vue/compiler-sfc 2.7.0-beta.8 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler-sfc.js +6 -2
- package/package.json +1 -1
package/dist/compiler-sfc.js
CHANGED
|
@@ -8264,8 +8264,12 @@ function compileScript(sfc, options = { id: '' }) {
|
|
|
8264
8264
|
}
|
|
8265
8265
|
if (options.babelParserPlugins)
|
|
8266
8266
|
plugins.push(...options.babelParserPlugins);
|
|
8267
|
-
if (isTS)
|
|
8268
|
-
plugins.push('typescript'
|
|
8267
|
+
if (isTS) {
|
|
8268
|
+
plugins.push('typescript');
|
|
8269
|
+
if (!plugins.includes('decorators')) {
|
|
8270
|
+
plugins.push('decorators-legacy');
|
|
8271
|
+
}
|
|
8272
|
+
}
|
|
8269
8273
|
if (!scriptSetup) {
|
|
8270
8274
|
if (!script) {
|
|
8271
8275
|
throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`);
|