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-16 18:25:42 +00:00
|
|
|
},
|
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'),
|
2022-04-16 18:25:42 +00:00
|
|
|
scss: path.resolve(__dirname, './src/scss'),
|
|
|
|
},
|
|
|
|
},
|
2022-04-13 14:25:50 +00:00
|
|
|
});
|