-
-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Description
基于 这个模板
详细报错信息:
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: '',
},
};
});Metadata
Metadata
Assignees
Labels
No labels
