You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a monorepo I am working on (@carbon/charts), there is a package called core. For that package, when I run yarn build:package with vite-plugin-dts@2.3.0, it runs vite and outputs the type declarations to dist with the correct paths (mirroring src).
When I bump vite-plugin-dts to 3.x (now 3..1.1) with no other configuration changes to tsconfig.json or vite.config.ts, the type declarations are being output to dist/dist/core/src instead of dist as they were previously.
Steps to reproduce:
git clone https://github.com/carbon-design-system/carbon-charts.git
cd carbon-charts
yarn install
cd packages/core
yarn build:package
# Now examine packages/core/dist - type declarations look good because we are on 2.3.0# Modify packages/core/packages.json and change the version of `vite-plugin-dts` to `^3.1.1`
yarn build:package
# Examine dist and you'll see the type declarations in `dist/dist/core/src` instead of `dist`
I suspect it is redefining the root as I have a file called packages/core/src/demo/utils/package-versions.ts that imports the package.json files from the other packages. This is technically a TypeScript compilation error because those package.json files are outside of my root directory - but it's also intentional because I don't need to type JSON files and I don't want type declaration generated for all packages.
There are some incorrect when process public directory of entries.
Some limitations in v2 (led to some type errors) have gone in v3, the behavior most similar to tsc now. So you can specify entryRoot: 'src' (or override rootDir) to ensure result equivalents to use tsc (after the fix is released).
Describe the bug
In a monorepo I am working on (
@carbon/charts
), there is a package calledcore
. For that package, when I runyarn build:package
withvite-plugin-dts@2.3.0
, it runs vite and outputs the type declarations todist
with the correct paths (mirroring src).When I bump
vite-plugin-dts
to 3.x (now 3..1.1) with no other configuration changes to tsconfig.json or vite.config.ts, the type declarations are being output todist/dist/core/src
instead ofdist
as they were previously.Steps to reproduce:
Reproduction
See above
Steps to reproduce
See above
System Info
Validations
The text was updated successfully, but these errors were encountered: