We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 04829fa + 5e06a05 commit 27f60d6Copy full SHA for 27f60d6
packages/webpack-plugin/lib/script-setup-compiler/index.js
@@ -380,7 +380,9 @@ function compileScriptSetup (
380
381
if (node.type === 'ImportDeclaration') {
382
// import declarations are moved to top
383
- _s.move(start, end, 0)
+ if (start !== 0) {
384
+ _s.move(start, end, 0)
385
+ }
386
// dedupe imports
387
let removed = 0
388
const removeSpecifier = (i) => {
@@ -533,7 +535,9 @@ function compileScriptSetup (
533
535
(node.type === 'VariableDeclaration' && node.declare)
534
536
) {
537
recordType(node, declaredTypes)
- _s.move(node.start, node.end + 1, 0)
538
+ if (node.start !== 0) {
539
+ _s.move(node.start, node.end + 1, 0)
540
541
}
542
543
0 commit comments