Repository navigation
Conversation
The themeable entry point `theming.js` is a copy of the one in
cloudscape-design/components, which compiles it to CommonJS. This repo
compiled it with `module: ESNext`, so the emitted file kept `import`
syntax and Node loaded it as ESM, where `__dirname` is not defined:
ReferenceError: __dirname is not defined in ES module scope
Mirror the components repo: compile `src-themeable` to CommonJS and
point the `exports` entry at the file via `default`, so both `import`
and `require` resolve to the CJS build.
Also drop `designTokensTemplateDir`: chat components reuse the core
design tokens and ship no `template-tokens` directory, so the build
failed with ENOENT once the import succeeded. The option is optional in
theming-build; the design-tokens output is still generated from the
preset.
amanabiy
marked this pull request as ready for review
October 7, 2026 11:26
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (88.16%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
=======================================
Coverage 88.16% 88.16%
=======================================
Files 25 25
Lines 355 355
Branches 100 101 +1
=======================================
Hits 313 313
Misses 42 42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
amanabiy
enabled auto-merge
October 8, 2026 17:26
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror the components repo: compile
src-themeableto CommonJS and point theexportsentry at the file viadefault, so bothimportandrequireresolve to the CJS build.Also drop
designTokensTemplateDir: chat components reuse the core design tokens and ship notemplate-tokensdirectory, so the build failed with ENOENT once the import succeeded. The option is optional in theming-build; the design-tokens output is still generated from the preset.ticket: AWSUI-62329
Description
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.