代码拉取完成,页面将自动刷新
// vite.config.ts
import { defineConfig, loadEnv } from "file:///D:/project/webstorm/vite-project/node_modules/.pnpm/vite@5.0.11_@types+node@20.10.6_sass@1.69.7/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/project/webstorm/vite-project/node_modules/.pnpm/@vitejs+plugin-vue@4.6.2_vite@5.0.11_vue@3.4.5/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import viteEslint from "file:///D:/project/webstorm/vite-project/node_modules/.pnpm/vite-plugin-eslint@1.8.1_eslint@8.56.0_vite@5.0.11/node_modules/vite-plugin-eslint/dist/index.mjs";
import path from "path";
import { createSvgIconsPlugin } from "file:///D:/project/webstorm/vite-project/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.0.11/node_modules/vite-plugin-svg-icons/dist/index.mjs";
var vite_config_default = defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd());
console.log(env);
return {
plugins: [
vue(),
viteEslint(),
createSvgIconsPlugin({
iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
symbolId: "icon-[dir]-[name]"
})
],
resolve: {
alias: {
"@": path.resolve("./src")
// 相对路径别名配置,使用 @ 代替 src
}
},
// scss全局变量配置
css: {
preprocessorOptions: {
scss: {
javascriptEnabled: true,
additionalData: '@import "./src/styles/variable.scss";'
}
}
},
// 配置代理服务器
server: {
proxy: {
"/api": {
// 目标服务器地址
target: env.VITE_SERVE,
// 需要代理跨域
changeOrigin: true,
// 路径重写
rewrite: (path2) => path2.replace(/^\/api/, "")
}
}
}
};
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxwcm9qZWN0XFxcXHdlYnN0b3JtXFxcXHZpdGUtcHJvamVjdF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FBSyxLQUFLLFFBQVEsT0FBTztBQUFBO0FBQUEsTUFDM0I7QUFBQSxJQUNGO0FBQUE7QUFBQSxJQUVBLEtBQUs7QUFBQSxNQUNILHFCQUFxQjtBQUFBLFFBQ25CLE1BQU07QUFBQSxVQUNKLG1CQUFtQjtBQUFBLFVBQ25CLGdCQUFnQjtBQUFBLFFBQ2xCO0FBQUEsTUFDRjtBQUFBLElBQ0Y7QUFBQTtBQUFBLElBRUEsUUFBUTtBQUFBLE1BQ04sT0FBTztBQUFBLFFBQ0wsUUFBUTtBQUFBO0FBQUEsVUFFTixRQUFRLElBQUk7QUFBQTtBQUFBLFVBRVosY0FBYztBQUFBO0FBQUEsVUFFZCxTQUFTLENBQUNBLFVBQVNBLE1BQUssUUFBUSxVQUFVLEVBQUU7QUFBQSxRQUM5QztBQUFBLE1BQ0Y7QUFBQSxJQUNGO0FBQUEsRUFDRjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbInBhdGgiXQp9Cg==
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。