-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: enhance plugin to support alias resolution for css module plugin #7130
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
base: release/next
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This pull request enhances the CSS Modules plugin to support path alias resolution, allowing CSS module imports to work correctly with custom path aliases defined in the project configuration. The changes ensure that when CSS modules are imported using aliases, they are properly resolved to their actual file paths during the build process.
Key changes:
- Added alias configuration parameter to CSS Modules plugin across multiple build services
- Integrated alias resolution logic into the CSS module path resolution process
- Exported the AliasWithEmpty type for reuse in the CSS modules plugin
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ice/src/service/serverCompiler.ts | Passes alias configuration to cssModulesPlugin |
| packages/ice/src/service/preBundleDeps.ts | Adds alias parameter to cssModulesPlugin call |
| packages/ice/src/service/analyze.ts | Exports AliasWithEmpty type for use in other modules |
| packages/ice/src/service/ServerRunner.ts | Includes alias configuration in cssModulesPlugin setup |
| packages/ice/src/esbuild/cssModules.ts | Implements alias resolution logic in the CSS modules plugin |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
XGHeaven
left a comment
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.
Add a changeset?
DONE |
This pull request updates the CSS Modules plugin integration across the build pipeline to support path alias resolution, improving how CSS module imports are handled in projects with custom path aliases. The main changes involve passing alias configuration to the CSS Modules plugin and updating its internal logic to resolve paths using these aliases.