build(md3): resolve ESM imports during compilation - #50
Merged
Merged
Conversation
Contributor
Playwright test resultsDetails
|
Contributor
|
📊 Ionic 9 Playwright Test Report View the detailed Ionic 9 report: https://rdlabo-dev.github.io/ionic-theme-md3/pr-50/ Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run. |
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.
The MD3 theme's emitted ESM contained extensionless imports, so direct Node imports could fail. Keep TypeScript source imports extensionless, matching Ionic's source style, and resolve them automatically during the normal build.
@rdlabo/ionic-theme-utils@0.1.2for the sharedrdlabo-build-themeandrdlabo-check-esmCLIs.tsc --noEmitfor type checking and use tsdown to emit ESM JavaScript and declarations with resolved relative specifiers. Source files are unchanged; dependencies stay external and CSS output is preserved."type": "module", use TypeScript's bundler resolution mode, and rename the CommonJS Prettier configuration to.cjs.This follows the build-time approach discussed in rdlabo-dev/ionic-theme-ios27#222. Shared tooling: rdlabo-dev/ionic-theme-utils#5.
Validation on Node 24.17.0:
skipLibCheck.Browser visual and native-device tests were not run locally for this build change.