Nitropack should not override NODE_ENV when run command nuxt generate
.
#2002
kaokei
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am developing an SSG project using Nuxt and Ant Design Vue. When I run the nuxt generate command, initially, the NODE_ENV is indeed set to production, which is as expected. However, during the pre-rendering phase, the NODE_ENV is overridden to prerender.
This results in Ant Design Vue generating incorrect class name prefixes. The relevant code is as follows:
File Path: ant-design-vue/es/_util/cssinjs/hooks/useCacheToken.js
The code that overrides NODE_ENV in Nitropack is as follows:
And
Beta Was this translation helpful? Give feedback.
All reactions