How can I access envMode
variable in js file or Vue SFC ?
#2062
-
Do you happen to have met a similar request? |
Beta Was this translation helpful? Give feedback.
Answered by
chenjiahan
Apr 11, 2024
Replies: 1 comment
-
You can use
export default defineConfig(({ envMode }) => {
return {
source: {
define: {
ENV_MODE: JSON.stringify(envMode),
},
},
};
});
console.log(ENV_MODE); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Alkaidcc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
source.define
for injection: