mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(exports): resolve imports with explicit *.js extension (#1927)
Fixes #1925 Importing using the explicit `.*js` extension will throw an error as these are not included in the package exports map. Normally, this would be acceptable if it's not part of the API. However, the `optimizeImports` Carbon preprocessor rewrites certain imports (e.g., `breakpoints`) to the source `*.js` file. ```sh Internal server error: Failed to resolve import "carbon-components-svelte/src/Breakpoint/breakpoints.js" from "src/App.svelte". ```
This commit is contained in:
parent
0071990803
commit
0405edee7d
1 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,10 @@
|
|||
"types": "./types/*.svelte.d.ts",
|
||||
"import": "./src/*.svelte"
|
||||
},
|
||||
"./src/*.js": {
|
||||
"types": "./types/*.d.ts",
|
||||
"import": "./src/*.js"
|
||||
},
|
||||
"./src/*": {
|
||||
"types": "./types/*.d.ts",
|
||||
"import": "./src/*.js"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue