(vite2+vue3+ant-design-vue3) use 组件时 出现不明的 Uncaught TypeError: isFunction is not a function
langyamu opened this issue · comments
如影 commented
基于 这个模板
详细报错信息:
Uncaught TypeError: isFunction is not a function
at defineComponent (runtime-core.esm-bundler.js:2244:12)
at LocaleReceiver.js:4:16
main.ts 只要use 就会报错
import '@/styles/reset.css';
import { Calendar, Modal } from 'ant-design-vue';
import { createApp } from 'vue';
import App from './App.vue';
// createApp(App).use(Calendar).use(Modal).mount('#app');
createApp(App).use(Calendar).use(Modal).mount('#app');
vite.config.ts
import vue from '@vitejs/plugin-vue';
import * as path from 'path';
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
import Components from 'unplugin-vue-components/vite';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
const isDev: boolean = mode === 'development';
// https://vitejs.dev/config/
return {
base: isDev ? '' : '/widgets/calendar',
plugins: [
vue(),
Components({
resolvers: [AntDesignVueResolver()],
}),
],
resolve: {
//设置别名
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
server: {
port: 8080, //启动端口
hmr: {
host: '127.0.0.1',
port: 8080,
},
// 设置 https 代理
proxy: {
'/api': {
target: 'http://127.0.0.1:68066',
changeOrigin: true,
// rewrite: (path: string) => path.replace(/^\/api/, '')
},
},
},
build: {
outDir: '',
},
};
});
bryne-k commented
朋友,请问这个问题是如何解决的哇
glq1218 commented
这个问题好恶心啊,我写了半天发现给我报错了
Villian commented
出现了同样的问题 ,请问怎么解决?
bryne-k commented
更换vue版本,
…---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 日期 | 2023年04月23日 16:22 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.***>***@***.***> |
| 主题 | Re: [antfu/unplugin-vue-components] (vite2+vue3+ant-design-vue3) use 组件时 出现不明的 Uncaught TypeError: isFunction is not a function (Issue #370) |
出现了同样的问题 ,请问怎么解决?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
jianfang commented
最新版本还是报错 @bryne-k
"vue": "3.2.47",
"unplugin-auto-import": "^0.15.3",
"unplugin-vue-components": "^0.24.1",
"vite": "4.3.4",
bryne-k commented
最新版本可能也会存在这个问题,可以试试3.2.26
…---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 日期 | 2023年05月05日 14:35 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.***>***@***.***> |
| 主题 | Re: [antfu/unplugin-vue-components] (vite2+vue3+ant-design-vue3) use 组件时 出现不明的 Uncaught TypeError: isFunction is not a function (Issue #370) |
最新版本还是报错 @bryne-k
"vue": "3.2.47",
"unplugin-auto-import": "^0.15.3",
"unplugin-vue-components": "^0.24.1",
"vite": "4.3.4",
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
jianfang commented
好的 我试试
月海 commented
fix 了吗?issue 怎么关了