mirror of
https://github.com/sahadev/vue-component-creater-ui.git
synced 2025-12-16 23:44:16 +08:00
update: 完全升级Vue3过程中的记录
This commit is contained in:
32
vite.config.js
Normal file
32
vite.config.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import ViteRequireContext from "@originjs/vite-plugin-require-context";
|
||||
|
||||
import path from "path";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
ViteRequireContext(),
|
||||
],
|
||||
resolve: {
|
||||
alias: [
|
||||
{
|
||||
find: "@",
|
||||
replacement: path.resolve(__dirname, "src"),
|
||||
},
|
||||
{
|
||||
find: "vue",
|
||||
replacement: "vue/dist/vue.esm-bundler.js"
|
||||
}
|
||||
],
|
||||
extensions: [".vue", ".js"],
|
||||
},
|
||||
server: {
|
||||
fs: {
|
||||
// 可以为项目根目录的上一级提供服务
|
||||
allow: [".."],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user