-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Add compiler.define
option
#71802
Add compiler.define
option
#71802
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
I just had the dumb realization that the It doesn't do the exact same thing but very often it might just be enough 🤔 Feel free to make the call that this PR is unnecessary. |
It might actually not be a bad idea because the Encountered through user report in: getsentry/sentry-javascript#14193 |
Was discussing this with @sokra and @feedthejim, can you move the option to |
@timneutkens Makes sense! I moved the option to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR Luca!
Tests Passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the docs! 🙏🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the define.test.ts
added is failing during test runs 👀
Just saw. I have to look into it but either I am missing something completely obvious or there is something fundamentally off with the mechanics beneath what I am touching in this PR. |
Fixed the issue with the tests and opened a new bug report for Turbopack here: #72576. The issue was related to |
Adds a
compiler.define
option to next.config.js to statically replace any variables during build-time for Turbopack. This is similar to Webpack'sDefinePlugin
.Relates to: #71476