开发者问题收集

VueJS 3:“在‘vue’中未找到导出‘default’(导入为‘Vue’)

2021-09-23
8790

ma​​in.js

import Vuex from "vuex"
import Vue from 'vue'
import { createApp } from 'vue'
import App from './App.vue'
import store from "./store"
import drizzleVuePlugin from "@drizzle/vue-plugin"
import drizzleOptions from "./drizzleOptions"


const app = createApp(App)
app.use( Vue, Vuex, store,drizzleVuePlugin, { store, drizzleOptions })
app.mount('#app')

我正在使用 VueJS 3。我在终端中收到此信息:

"export 'default' (imported as 'Vue') was not found in 'vue'

我该如何修复此问题?

1个回答

我不确定,但我使用了这些代码并且它们有效。

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

const app = createApp(App)
app.use(store)
app.use(router)
app.mount('#app')
ElsaKarami
2021-09-23