fix(nuxt3): remove existing globals from auto-imports (#3035)

This commit is contained in:
Daniel Roe 2022-02-03 10:21:35 +00:00 committed by GitHub
parent ed4f4f51ab
commit f867841327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -38,11 +38,7 @@ export const Nuxt3AutoImports: AutoImportSource[] = [
from: 'vue', from: 'vue',
names: [ names: [
// <script setup> // <script setup>
'defineEmits',
'defineExpose',
'defineProps',
'withCtx', 'withCtx',
'withDefaults',
'withDirectives', 'withDirectives',
'withKeys', 'withKeys',
'withMemo', 'withMemo',
@ -78,7 +74,6 @@ export const Nuxt3AutoImports: AutoImportSource[] = [
'shallowReactive', 'shallowReactive',
'shallowReadonly', 'shallowReadonly',
'shallowRef', 'shallowRef',
'stop',
'toRaw', 'toRaw',
'toRef', 'toRef',
'toRefs', 'toRefs',

View File

@ -73,6 +73,13 @@ describe('auto-imports:nuxt3', () => {
}) })
const excludedVueHelpers = [ const excludedVueHelpers = [
// Already globally registered
'defineEmits',
'defineExpose',
'defineProps',
'withDefaults',
'stop',
//
'__esModule', '__esModule',
'devtools', 'devtools',
'EffectScope', 'EffectScope',