@dword-design/base-config-nuxt 4.0.12 → 4.0.13
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/index.js +6 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -116,15 +116,12 @@ export default {
|
|
|
116
116
|
const query = parseVueRequest(id)
|
|
117
117
|
if (query.filename.endsWith('.vue')) {
|
|
118
118
|
const sfc = parse(code)
|
|
119
|
-
|
|
120
|
-
sfc.descriptor
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
sfc.descriptor.script.content = await transform(sfc.descriptor.script.content, {
|
|
126
|
-
plugins: [['@babel/plugin-proposal-pipeline-operator', { proposal: 'fsharp' }]]
|
|
127
|
-
}).code
|
|
119
|
+
for (const section of ['scriptSetup', 'script']) {
|
|
120
|
+
if (sfc.descriptor[section] && sfc.descriptor[section].lang === undefined) {
|
|
121
|
+
sfc.descriptor[section].content = await transform(sfc.descriptor[section].content, {
|
|
122
|
+
plugins: [['@babel/plugin-proposal-pipeline-operator', { proposal: 'fsharp' }]]
|
|
123
|
+
}).code
|
|
124
|
+
}
|
|
128
125
|
}
|
|
129
126
|
return vueSfcDescriptorToString(sfc.descriptor)
|
|
130
127
|
}
|