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