You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should be able to achieve the same by dynamically importing the module. Otherwise you can create a plugin that detects the comments and strip them out.
Description
in develop
`
import { A } from '@/config';
import { B } from '@/static';
let data;
if(import.meta.env.DEV){
// doSomething
data = A.data;
};
if(import.meta.env.PROD){
// doSomething
data = B.data;
}
`
Suggested solution
I want it's:
`
/* vite-env-dev start /
import { A } from '@/config';
/ vite-end /
/ vite-env-pro start /
import { B } from '@/static';
/ vite-end */
let data;
/* vite-env-dev start /
if(import.meta.env.DEV){
// doSomething
data = A.data;
};
/ vite-end /
/ vite-env-pro start /
if(import.meta.env.PROD){
// doSomething
data = B.data;
}
/ vite-end */
`
This can reduce the size and usage of packaged files.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: