52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
/*
|
|
* @Author: Kane
|
|
* @Date: 2023-02-15 09:25:52
|
|
* @LastEditors: Kane
|
|
* @LastEditTime: 2023-11-13 10:42:29
|
|
* @FilePath: /task_schedule/vite.config.js
|
|
* @Description:
|
|
*
|
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
*/
|
|
import { defineConfig, loadEnv } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import path from "path";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(( command, mode ) =>
|
|
{
|
|
const env = loadEnv( mode, process.cwd(), "" );
|
|
|
|
return {
|
|
server:{ host: "localhost", port: 5173, },
|
|
build: {
|
|
outDir: "../../../输出/web",
|
|
},
|
|
plugins: [vue(),],
|
|
base: "./",
|
|
resolve: {
|
|
//配置别名
|
|
alias: [
|
|
{
|
|
find: /^~/,
|
|
replacement: "",
|
|
},
|
|
{
|
|
find: "@",
|
|
replacement: path.resolve( __dirname, "src" ),
|
|
},
|
|
],
|
|
},
|
|
define: {
|
|
__APP_ENV__: env.APP_ENV,
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: "@import \"./src/assets/css/public/variables.scss\",\"./src/assets/css/public/mixin.scss\";",
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|