mue/vite.config.js

28 lines
643 B
JavaScript
Raw Normal View History

2022-04-13 14:25:50 +00:00
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
2022-04-13 21:15:07 +00:00
const isProd = process.env.NODE_ENV === 'production';
2022-04-13 14:25:50 +00:00
export default defineConfig({
plugins: [react()],
2022-04-13 21:15:07 +00:00
server: {
hmr: {
protocol: 'ws',
host: 'localhost',
},
2022-04-13 21:15:07 +00:00
},
build: {
minify: isProd,
},
2022-04-13 14:25:50 +00:00
resolve: {
extensions: ['.js', '.jsx'],
alias: {
components: path.resolve(__dirname, './src/components'),
modules: path.resolve(__dirname, './src/modules'),
translations: path.resolve(__dirname, './src/translations'),
scss: path.resolve(__dirname, './src/scss'),
},
},
2022-04-13 14:25:50 +00:00
});