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

Make the NEXT_PRIVATE_LOCAL_WEBPACK error optional? #2500

Closed
2 tasks done
kyletsang opened this issue May 16, 2024 · 2 comments
Closed
2 tasks done

Make the NEXT_PRIVATE_LOCAL_WEBPACK error optional? #2500

kyletsang opened this issue May 16, 2024 · 2 comments

Comments

@kyletsang
Copy link
Contributor

Clear and concise description of the problem

Is it possible to make this error optional?
process.env.NEXT_PRIVATE_LOCAL_WEBPACK is not set to true, please set it to true, and "npm install webpack"

Next.js has updated the internal bundled webpack to v5.90.0. I tested against this version previously so I'm fairly confident it will work fine in my apps. I'm looking to reduce the number of manual configurations needed and to not manage a webpack dep if I don't have to.

I'm willing to accept the risks of this potentially breaking in the future as the plugin uses more Webpack APIs. At that point in time, I'll go back to using the env var.

Suggested solution

Perhaps have a config option that will prevent the plugin from throwing the error for advanced users who understand the risks. Call it ignorePrivateLocalWebpackError?

I'm happy to open a PR if this idea sounds good.

Alternative

None

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@ScriptedAlchemy
Copy link
Member

It is not optional. Its not about the version of webpack next.js has, its that next.js bundles it and destroys exports. I cannot get webpack/lib/some/deep/internal/module when its next.js becasue "webpack" its just 1 file called bundled5.js

@kyletsang
Copy link
Contributor Author

Thanks for the clarification Zack

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

2 participants