fix(compiler-sfc): fix <script> and <script setup> co-usage ordering edge case (#4419)
Fix: #4395 Fix: #4376
This commit is contained in:
@@ -33,6 +33,27 @@ return { x }
|
||||
export const n = 1"
|
||||
`;
|
||||
|
||||
exports[`SFC compile <script setup> <script> and <script setup> co-usage script setup first, lang="ts", script block content export default 1`] = `
|
||||
"import { defineComponent as _defineComponent } from 'vue'
|
||||
import { x } from './x'
|
||||
|
||||
function setup(__props, { expose }) {
|
||||
|
||||
x()
|
||||
|
||||
return { x }
|
||||
}
|
||||
|
||||
|
||||
const __default__ = {
|
||||
name: \\"test\\"
|
||||
}
|
||||
|
||||
export default _defineComponent({
|
||||
...__default__,
|
||||
setup})"
|
||||
`;
|
||||
|
||||
exports[`SFC compile <script setup> <script> and <script setup> co-usage spaces in ExportDefaultDeclaration node with many spaces and newline 1`] = `
|
||||
"import { x } from './x'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user