Closed brunnerh closed 2 years ago
This should support it but it's not released: https://github.com/carbon-design-system/carbon-preprocess-svelte/pull/32
@metonym This currently does not work for me because the code that determines the version makes an assumption which does not always hold.
In utils.ts
the function getPackageJson
looks for the package.json
only in the current working directory when checking the package versions. I have multiple build configurations in separate sub-directories which all implicitly use the packages from the repository root directory (which also contains the package.json
)1. During build the working directory is the directory of the current build file so the versions are not being determined correctly.
Hence the fallback kicks in which uses the LATEST_MAJOR_VERSION
from constants.ts
, which is still at 10
for the icons.
1 If I recall correctly, Node actually uses all node_modules
directories on the way to the root of the file system directory tree.
Named imports are no longer resolved correctly with the structure of v11.
E.g.
Results in errors like:
(The same thing happens for
optimizeCarbonImports
from'carbon-components-svelte/preprocess'
)