@samitouri / QOSami-HFS / commits / 5ab40b0e

disabled vite-plugin-babel-import, as the gain is small (0.5s on my machine) and is causing problems on linux (possibly because of libraryChangeCase value)

Massimo Melina committed Jul 7, 2024 at 18:08 UTC 5ab40b0e1216898df5c6da8215508f32539ad2fb
2 files changed +7 -6
admin/package.json
+1 -2
@@ -37,8 +37,7 @@
37 "@types/react-dom": "^18.2.18",
38 "@types/react-window": "^1.8.8",
39 "@types/react-virtualized-auto-sizer": "^1.0.4",
40 - "vite": "^5.0.12",
41 - "vite-plugin-babel-import": "github:rejetto/vite-plugin-babel-import"
40 + "vite": "^5.0.12"
41 },
42 "eslintConfig": {
43 "extends": [
admin/vite.config.ts
+6 -4
@@ -1,5 +1,6 @@
1 import { defineConfig } from 'vite'
2 -import vitePluginImport from 'vite-plugin-babel-import';
2 +//import vitePluginImport from 'vite-plugin-babel-import';
3 +// package.json/devDependencies: "vite-plugin-babel-import": "github:rejetto/vite-plugin-babel-import"
4
5 // https://vitejs.dev/config/
6 export default defineConfig({
@@ -8,7 +9,7 @@ export default defineConfig({
9 emptyOutDir: true,
10 target: "es2015",
11 rollupOptions: {
11 - plugins: [
12 + /* plugins: [
13 vitePluginImport([
14 { // speed up build process (~2s on my M1) by bringing "modules transformed" from 11k+ down to 1.7k+
15 libraryName: '@mui/icons-material',
@@ -17,7 +18,7 @@ export default defineConfig({
18 ignoreStyles: [],
19 },
20 ])
20 - ],
21 + ],*/
22 onwarn(warning, warn) {
23 if (warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message.includes(`"use client"`)) return
24 warn(warning)
@@ -29,7 +30,8 @@ export default defineConfig({
30 host: '127.0.0.1',
31 proxy: {
32 '/~/': {
32 - target: 'http://localhost',
33 + target:
34 + 'http://localhost',
35 proxyTimeout: 2000,
36 changeOrigin: true,
37 ws: true,