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
I need this to avoid installing the @nuxt/eslint module when installing dependencies without development dependencies with pnpm install --prod on the production server, because otherwise I get an error if I just specify the @nuxt/eslint module in the modules section. I need this condition for that.
However, this condition does not work because I simply run pnpm postinstall, process.env.NODE_ENV is set to production and as a result the ./.nuxt/eslint.config.mjs file is not created for the module @nuxt/eslint to work. There may be other things for development that don't work with other modules or don't generate types.
Besides, the .nuxt folder is needed exclusively for development, not for the production build. So why is it set to production by default, and not development?
The text was updated successfully, but these errors were encountered:
Why was the default mode set to production when running from the command line without setting the NODE_ENV env variable?
I'm talking about this line in the command:
cli/src/commands/prepare.ts
Line 26 in bca75ab
Typically, in
nuxt.config.ts
you might have logic like this:I need this to avoid installing the
@nuxt/eslint
module when installing dependencies without development dependencies withpnpm install --prod
on the production server, because otherwise I get an error if I just specify the@nuxt/eslint
module in the modules section. I need this condition for that.However, this condition does not work because I simply run
pnpm postinstall
,process.env.NODE_ENV
is set toproduction
and as a result the./.nuxt/eslint.config.mjs
file is not created for the module@nuxt/eslint
to work. There may be other things for development that don't work with other modules or don't generate types.Besides, the .nuxt folder is needed exclusively for development, not for the production build. So why is it set to production by default, and not development?
The text was updated successfully, but these errors were encountered: