Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ Versioning follows the policy in [CONTRIBUTING.md](CONTRIBUTING.md#versioning).

## [Unreleased]

## [0.1.0-alpha.5]

### Fixed

- The build no longer mistakes a dependency stylesheet for one of its own. A
bare specifier such as `katex/dist/katex.min.css` resolves to a path inside
the package root, so the check meant to leave dependencies alone never fired
and the build would stop on a stylesheet it was never meant to re-link. This
package has no such import yet; `@lablup/ui-ai` hit it while taking the same
fix.

## [0.1.0-alpha.4]

### Added
Expand Down Expand Up @@ -72,7 +83,8 @@ mid-migration.
validation, and a clean external React install fixture.
- Apache-2.0 license and the initial public boundary rules.

[Unreleased]: https://github.com/lablup/ui-common/compare/v0.1.0-alpha.4...HEAD
[Unreleased]: https://github.com/lablup/ui-common/compare/v0.1.0-alpha.5...HEAD
[0.1.0-alpha.5]: https://github.com/lablup/ui-common/compare/v0.1.0-alpha.4...v0.1.0-alpha.5
[0.1.0-alpha.4]: https://github.com/lablup/ui-common/compare/v0.1.0-alpha.3...v0.1.0-alpha.4
[0.1.0-alpha.3]: https://github.com/lablup/ui-common/compare/v0.1.0-alpha.2...v0.1.0-alpha.3
[0.1.0-alpha.2]: https://github.com/lablup/ui-common/compare/v0.1.0-alpha.1...v0.1.0-alpha.2
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lablup/ui-common",
"version": "0.1.0-alpha.4",
"version": "0.1.0-alpha.5",
"description": "Shared, product-neutral UI components and design tokens for Lablup products",
"license": "Apache-2.0",
"author": "Lablup Inc.",
Expand Down
13 changes: 11 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,18 @@ function linkComponentStyles(): Plugin {
for (const imported of this.getModuleInfo(id)?.importedIds ?? []) {
if (!imported.endsWith(".css")) continue;

const key = sourceKey(imported);
// A stylesheet from a dependency stays a bare specifier that the
// consumer resolves; only this package's own files are re-linked.
// consumer resolves, and is already present in the output as one.
// Only this package's own files are re-linked. Deciding that on
// the specifier form rather than on where the path lands is what
// this package needs before it grows such an import: resolving a
// bare specifier against the root produces a path inside it, so
// the "outside the package" test never fires and the build stops
// on a stylesheet it was never meant to touch. `@lablup/ui-ai`
// found this the hard way with `katex/dist/katex.min.css`.
if (!imported.startsWith(".") && !isAbsolute(imported)) continue;

const key = sourceKey(imported);
if (key.startsWith("..")) continue;

const emitted = emittedBySource.get(key);
Expand Down