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

docs(guides): improve document #6555

Merged
merged 3 commits into from Jan 18, 2023

Conversation

chenxsan
Copy link
Member

@chenxsan chenxsan commented Dec 13, 2022

Improve document.

@vercel
Copy link

vercel bot commented Dec 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
webpack-js-org ✅ Ready (Inspect) Visit Preview Dec 13, 2022 at 10:45AM (UTC)

T> Technically, `NODE_ENV` is a system environment variable that Node.js exposes into running scripts. It is used by convention to determine dev-vs-prod behavior by server tools, build scripts, and client-side libraries. Contrary to expectations, `process.env.NODE_ENV` is not set to `'production'` **within** the build script `webpack.config.js`, see [#2537](https://github.com/webpack/webpack/issues/2537). Thus, conditionals like `process.env.NODE_ENV === 'production' ? '[name].[contenthash].bundle.js' : '[name].bundle.js'` within webpack configurations do not work as expected.
T> Technically, `NODE_ENV` is a system environment variable that Node.js exposes into running scripts. It is used by convention to determine dev-vs-prod behavior by server tools, build scripts, and client-side libraries.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guide doesn't mention the usage of --node-env.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for heads-up, absolutely my oversight. I've went over that thread, and think we can still make some improvements here. Let me know what you think.

@chenxsan chenxsan changed the title docs(guides): clean stale content docs(guides): improve document Dec 13, 2022
@chenxsan chenxsan merged commit 314beb2 into webpack:main Jan 18, 2023
@chenxsan chenxsan deleted the docs/clean-stale-content branch January 18, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants