42 lines
821 B
JavaScript
42 lines
821 B
JavaScript
/*
|
|
* @Author: Kane
|
|
* @Date: 2023-02-15 09:25:52
|
|
* @LastEditors: Kane
|
|
* @LastEditTime: 2023-02-28 22:36:10
|
|
* @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 {
|
|
plugins: [vue(),],
|
|
base: './',
|
|
resolve: {
|
|
//配置别名
|
|
alias: [
|
|
{
|
|
find: /^~/,
|
|
replacement: '',
|
|
},
|
|
{
|
|
find: '@',
|
|
replacement: path.resolve(__dirname, 'src'),
|
|
},
|
|
],
|
|
},
|
|
define: {
|
|
__APP_ENV__: env.APP_ENV,
|
|
},
|
|
};
|
|
}
|
|
);
|