2023-02-15 05:07:17 +00:00
|
|
|
/*
|
|
|
|
* @Author: Kane
|
|
|
|
* @Date: 2023-02-15 09:25:52
|
|
|
|
* @LastEditors: Kane
|
2023-03-31 11:53:12 +00:00
|
|
|
* @LastEditTime: 2023-03-30 21:09:30
|
2023-02-15 05:07:17 +00:00
|
|
|
* @FilePath: /task_schedule/vite.config.js
|
|
|
|
* @Description:
|
|
|
|
*
|
|
|
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
|
|
*/
|
2023-03-04 16:37:24 +00:00
|
|
|
import { defineConfig, loadEnv } from "vite";
|
|
|
|
import vue from "@vitejs/plugin-vue";
|
|
|
|
import path from "path";
|
2023-02-15 05:07:17 +00:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
2023-03-24 09:01:14 +00:00
|
|
|
export default defineConfig(( command, mode ) =>
|
2023-02-28 16:20:47 +00:00
|
|
|
{
|
2023-03-24 09:01:14 +00:00
|
|
|
const env = loadEnv( mode, process.cwd(), "" );
|
2023-02-28 16:20:47 +00:00
|
|
|
|
2023-03-23 10:39:15 +00:00
|
|
|
return {
|
|
|
|
plugins: [vue(),],
|
|
|
|
base: "./",
|
|
|
|
resolve: {
|
|
|
|
//配置别名
|
|
|
|
alias: [
|
|
|
|
{
|
|
|
|
find: /^~/,
|
|
|
|
replacement: "",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
find: "@",
|
2023-03-24 09:01:14 +00:00
|
|
|
replacement: path.resolve( __dirname, "src" ),
|
2023-03-23 10:39:15 +00:00
|
|
|
},
|
|
|
|
],
|
2023-02-28 16:20:47 +00:00
|
|
|
},
|
2023-03-23 10:39:15 +00:00
|
|
|
define: {
|
|
|
|
__APP_ENV__: env.APP_ENV,
|
2023-02-28 16:20:47 +00:00
|
|
|
},
|
2023-03-23 10:39:15 +00:00
|
|
|
css: {
|
|
|
|
preprocessorOptions: {
|
|
|
|
scss: {
|
2023-03-31 11:53:12 +00:00
|
|
|
additionalData: "@import \"./src/assets/css/public/variables.scss\",\"./src/assets/css/public/mixin.scss\";",
|
2023-03-23 10:39:15 +00:00
|
|
|
},
|
|
|
|
},
|
2023-03-04 16:37:24 +00:00
|
|
|
},
|
2023-03-23 10:39:15 +00:00
|
|
|
};
|
2023-03-03 03:35:34 +00:00
|
|
|
});
|