1 Star 0 Fork 0

himawari_sann/vue3-base-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts.timestamp-1686268315461-9e9e1a7d130ef.mjs 6.50 KB
一键复制 编辑 原始数据 按行查看 历史
// vite.config.ts
import { resolve } from "path";
import vue from "file:///C:/Users/Administrator/Desktop/vue3-base/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { createSvgIconsPlugin } from "file:///C:/Users/Administrator/Desktop/vue3-base/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import { viteMockServe } from "file:///C:/Users/Administrator/Desktop/vue3-base/node_modules/vite-plugin-mock/dist/index.js";
var __vite_injected_original_dirname = "C:\\Users\\Administrator\\Desktop\\vue3-base";
var vite_config_default = ({ command }) => {
return {
plugins: [
vue(),
//引入svg插件,使其能显示
createSvgIconsPlugin({
// Specify the icon folder to be cached
iconDirs: [resolve(process.cwd(), "src/assets/icons")],
// Specify symbolId format
symbolId: "icon-[dir]-[name]"
}),
viteMockServe({
localEnabled: command === "serve"
//保证开发阶段可以使用mock的接口
})
],
resolve: {
alias: {
"@": resolve(__vite_injected_original_dirname, "src")
},
extensions: [".ts", ".vue", ".js", ".jsx", ".tsx"]
// 导入时想要省略的扩展名列表。
},
css: {
preprocessorOptions: {
scss: {
javascriptEnabled: true,
additionalData: '@import "./src/styles/variable.scss";'
}
}
},
server: {
proxy: {
"/app-dev": {
target: "https://mock.apifox.cn/m1/2559636-0-default",
rewrite: (path) => path.replace(/^\/app-dev/, ""),
// 用于设置请求头中的 Origin 字段,如果该值为 true,则会将 Origin 的值设置为目标服务器的地址。
changeOrigin: true
}
}
},
build: {
// 不生成源代码映射文件
sourcemap: false,
// 消除打包大小超过500kb警告,打包后的单个chunk大小超过4000kb时,才会会发出警告
chunkSizeWarningLimit: 4e3
}
};
};
export {
vite_config_default as default
};
//# sourceM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QUNMLFlBQVk7QUFBQSxVQUNWLFFBQVE7QUFBQSxVQUNSLFNBQVMsQ0FBQyxTQUFTLEtBQUssUUFBUSxjQUFjLEVBQUU7QUFBQTtBQUFBLFVBRWhELGNBQWM7QUFBQSxRQUNoQjtBQUFBLE1BQ0Y7QUFBQSxJQUNGO0FBQUEsSUFDQSxPQUFPO0FBQUE7QUFBQSxNQUVMLFdBQVc7QUFBQTtBQUFBLE1BRVgsdUJBQXVCO0FBQUEsSUFDekI7QUFBQSxFQUNGO0FBQ0Y7IiwKICAibmFtZXMiOiBbXQp9Cg==
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/himawari_sann/vue3-base-template.git
git@gitee.com:himawari_sann/vue3-base-template.git
himawari_sann
vue3-base-template
vue3-base-template
master

搜索帮助