two script blocks complier err
Version
3.2.33
Reproduction link
Steps to reproduce
open it
What is expected?
After complier. script dont affect script-setup
What is actually happening?
It is unexpected
And this test cant pass too .
test('between two blocks should have "\n"', () => {
const { content } = compile(`
<script setup>
import foo from './foo'
</script>
<script>const bar = 1</script>
`)
expect(content).not.toMatch(`const bar = 1import foo from './foo'`)
})
I don't really understand what this is about.
The SFC playground has the second script block commented out in an illegal way (you can't use JS style comments outside of a script block), it that the issue? That this comment is erroneously applied to the import?
The I don't see the relation to the test you also posted, what is with the issue the line break? How is this related to the SFC Playground?
When I remove the weird comments, everything works just fine ....