File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import { defineConfig, loadEnv } from "vite";
22import reactRefresh from "@vitejs/plugin-react-refresh" ;
33
44// https://vitejs.dev/config/
5- export default ( { mode} ) => {
6- process . env = { ...process . env , ...loadEnv ( mode , process . cwd ( ) ) } ;
5+ export default ( { mode } ) => {
6+ process . env = { ...process . env , ...loadEnv ( mode , process . cwd ( ) ) } ;
77 return defineConfig ( {
88 plugins : [ reactRefresh ( ) ] ,
99 base : process . env . VITE_BASE_URL ,
@@ -12,5 +12,15 @@ export default ({mode}) => {
1212 "./runtimeConfig" : "./runtimeConfig.browser" ,
1313 } ,
1414 } ,
15+ build : {
16+ rollupOptions : {
17+ onwarn ( warning , warn ) {
18+ if ( warning . code === "MODULE_LEVEL_DIRECTIVE" ) {
19+ return ;
20+ }
21+ warn ( warning ) ;
22+ } ,
23+ } ,
24+ } ,
1525 } ) ;
16- }
26+ } ;
You can’t perform that action at this time.
0 commit comments