Replies: 1 comment 1 reply
-
The imports field and the development condition can be used in your case. If you add the following code to {
"imports": {
"#vanjs": {
"development": "vanjs-core/debug",
"default": "vanjs-core"
}
}
} and use it by Note that there might be a warning that tells the value of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wish to use macros or code snippets that are unique to ViteJS, so that it can understand that based on the environment I am on, it should decide between two line of code - kind of like how we have it in low-level languages.
Right now, here's how my code snippet looks like:
but the issue is that this code isn't understood by Vite, and the resulting outcome is that it also shows up in the browser during the
npm run dev
lifecycle. I don't wish to have this code in the browser - it should be dealt with by Vite - any tip on where I should look at?Beta Was this translation helpful? Give feedback.
All reactions