Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.env.NODE_ENV is not set for PostCSS Preset Env #1201

Open
Daniel3711997 opened this issue Mar 27, 2023 · 2 comments
Open

process.env.NODE_ENV is not set for PostCSS Preset Env #1201

Daniel3711997 opened this issue Mar 27, 2023 · 2 comments

Comments

@Daniel3711997
Copy link

If you have a package.json key like this:

"browserslist": {
      "production": [
          ">0.2%",
          "not dead",
          "not op_mini all"
      ],
      "development": [
          "last 1 chrome version",
          "last 1 firefox version",
          "last 1 safari version"
      ]
  }

The PostCSS Preset Env plugin does not load the 'development' key in development mode but 'production' :)

Possible fix, manual set NODE_ENV or process.env.NODE_ENV = 'development' or 'production'

or manually set BROWSERSLIST_ENV

@mandrasch
Copy link

Just came across this by accident, is this maybe related to this issue? 🤔

csstools/postcss-preset-env#206

@carsonbot
Copy link

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants