fix(templates): ignore wrangler when bundling to fix template styles #14067
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
What?
Adds the missing
/* webpackIgnore: true */annotation when importing wrangler, as in the original OpenNext patch.Why?
It looks like Webpack messes up the template styles when bundling the Cloudflare template, which causes some issues such as black text on black background or larger than usual font size.
How?
By telling Webpack to ignore wrangler when bundling.
This solution was found by @nwong212 in the original issue, I'm just submitting the fix after checking my self that it indeed fixes the bundling.
Fixes #13989