49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
/*
|
|
* @Author: Kane
|
|
* @Date: 2023-02-15 09:25:52
|
|
* @LastEditors: Kane
|
|
* @LastEditTime: 2023-06-07 15:53:53
|
|
* @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: 3000, },
|
|
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\";",
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|