Conversation
Replaces the JS webpack loader (@utoo/style-loader) with a native Rust implementation using Turbopack's CustomModuleType pattern. - Create InlineCssModuleType and InlineCssFileSource in transforms/inline_css/ - Move runtime JS files to embedded filesystem (crates/pack-core/js/src/style-loader/) - Register inline CSS module rule in client transforms - Remove @utoo/style-loader from webpack rules and import map Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
|
@copilot fix all CI |
The `process` method on `ModuleAssetContext` comes from the `AssetContext` trait, which needs to be in scope. Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
|
@copilot fix all CI again |
…t_names Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
Fixed in ad4376c. Two clippy errors:
|
|
@copilot rename the folder |
…mments Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
Done in d5ed0b9. Renamed |
Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
|
@copilot add a test case in crates/pack-tests/tests for current refactoring |
Co-authored-by: xusd320 <16577489+xusd320@users.noreply.github.com>
Added in 77f289f. Created |
📊 Performance Benchmark Report (with-antd)Utoopack Performance Report (Intelligent)Report ID: Executive SummaryKey Findings
Workload Distribution by Tier
🤖 AI Intelligent AttributionsNew section mapping granular tasks to bottlenecks. Top 10 Batching CandidatesThese highly-called tasks are dominated by a single parent. If the parent can batch them into one call, it drastically reduces scheduler overhead.
Top 20 Tasks by Total Duration
Duration Distribution
Action Items
Report generated by Intelligent Utoopack Performance Analysis Agent |
Rewrites the
@utoo/style-loaderentirely in Rust as a native TurbopackCustomModuleType, replacing the previous JS webpack loader approach.Changes Made
InlineCssModuleType: New Rust implementation ofCustomModuleTypetrait that transforms CSS files into JavaScript modules injecting styles into the DOM at runtimeInlineCssFileSource: Generates JS wrapper code around CSS content, supporting multiple injection strategies (Style,SingletonStyle,Link,LazyStyle,LazySingletonStyle)crates/pack-core/js/src/inline_css/(referencing webpack style-loader) for<style>and<link>tag injectionclient/transforms.rsstyle_loader.rswebpack rules module and@utoo/style-loaderfrom the import map, as inline CSS is now handled natively without webpack loader infrastructurecrates/pack-tests/tests/snapshot/style/inline_css/test case validating that CSS imports are correctly transformed into JS modules with embedded style injection via theinjectStylesIntoStyleTagruntimeOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.