feat: setup vite config

This commit is contained in:
Shivam Mishra
2024-10-04 17:10:56 +05:30
parent fe7afa564b
commit 24e5e9d0b9
3 changed files with 1658 additions and 34 deletions
+2
View File
@@ -100,6 +100,7 @@
"@iconify-json/logos": "^1.2.0",
"@iconify-json/lucide": "^1.2.5",
"@size-limit/file": "^8.2.4",
"@vitejs/plugin-legacy": "^5.4.2",
"@vitest/coverage-v8": "^2.1.1",
"@vue/test-utils": "^2.4.6",
"autoprefixer": "^10.4.20",
@@ -120,6 +121,7 @@
"prettier": "^3.3.3",
"size-limit": "^8.2.4",
"tailwindcss": "^3.4.13",
"terser": "^5.34.1",
"vite": "^5.4.8",
"vite-plugin-ruby": "^5.0.0",
"vitest": "^2.1.1"
+1648 -33
View File
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -18,6 +18,7 @@ and build it separately using Vite itself, toggled by an ENV variable.
We need to edit the `asset:precompile` rake task to include the SDK in the precompile list.
*/
import legacy from '@vitejs/plugin-legacy';
import { defineConfig } from 'vite';
import ruby from 'vite-plugin-ruby';
import path from 'path';
@@ -34,7 +35,13 @@ const vueOptions = {
},
};
let plugins = [ruby(), vue(vueOptions)];
let plugins = [
legacy({
targets: ['defaults', 'not IE 11'],
}),
ruby(),
vue(vueOptions),
];
if (isLibraryMode) {
plugins = [];