exempt data URL CSS from Pages Router global CSS restriction#89901
exempt data URL CSS from Pages Router global CSS restriction#89901timneutkens merged 5 commits intovercel:canaryfrom
Conversation
data:text/css imports are generated by tooling (e.g. next-yak) and are inline per-component — the global CSS ordering concern doesn't apply. The validation already had a carve-out for node_modules, this adds the same for data URL modules.
|
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 |
9f4ebb1 to
4e64c02
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
Tests Passed |
TypeScript resolves data:text/css imports without error, making the directive unused and failing the build type-check step.
|
@timneutkens can we please rerun the pipeline? |
|
@timneutkens the pnpm windows issues seem to be unrelated - can we just try again or should i fix anything? |
|
thank you @timneutkens this will allow us a lot to migrate our pages router app to turbopack |
|
I'll push a new canary so that you can try it 🙏 |
What?
Skip the Pages Router global CSS restriction for
data:URL imports (similar to app router and mixed app/pages router)Why?
data:text/cssshould work the same no matter if pages router, app router or mixed router usageHow?
the validation in
crates/next-api/src/module_graph.rsalready had a carve-out fornode_modules. This adds the same for data URL modules.fixes #89900
fixes #89900