feat(compiler-sfc): compileScript inline render function mode

This commit is contained in:
Evan You
2020-11-10 16:28:34 -05:00
parent 3f99e239e0
commit 886ed7681d
8 changed files with 192 additions and 77 deletions

View File

@@ -464,14 +464,20 @@ describe('SFC compile <script setup>', () => {
compile(`<script setup>
export const a = 1
</script>`)
).toThrow(`cannot contain non-type named exports`)
).toThrow(`cannot contain non-type named or * exports`)
expect(() =>
compile(`<script setup>
export * from './foo'
</script>`)
).toThrow(`cannot contain non-type named or * exports`)
expect(() =>
compile(`<script setup>
const bar = 1
export { bar as default }
</script>`)
).toThrow(`cannot contain non-type named exports`)
).toThrow(`cannot contain non-type named or * exports`)
})
test('ref: non-assignment expressions', () => {