cli: Add support for CSS exports in package build
This adds support for CSS entry points in package exports. When a package declares a CSS file in its exports field, the CLI will now automatically bundle it during `backstage-cli package build` and rewrite the export path from src/ to dist/ at publish time. The CSS bundling uses lightningcss to resolve @import statements and preserves @layer declarations that would otherwise be stripped during bundling. This allows packages like @backstage/ui to use the standard build command instead of custom build scripts for CSS bundling. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
"inquirer": "^8.2.0",
|
||||
"jest-css-modules": "^2.1.0",
|
||||
"json-schema": "^0.4.0",
|
||||
"lightningcss": "^1.29.1",
|
||||
"lodash": "^4.17.21",
|
||||
"minimatch": "^9.0.0",
|
||||
"node-stdlib-browser": "^1.3.1",
|
||||
|
||||
Reference in New Issue
Block a user