Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types compiled using alias that doesn't exist in package #316

Closed
3 tasks done
jeremydrichardson opened this issue Mar 27, 2024 · 1 comment
Closed
3 tasks done

Types compiled using alias that doesn't exist in package #316

jeremydrichardson opened this issue Mar 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jeremydrichardson
Copy link

Describe the bug

The build is changing my types in an unexpected way.

Source code

import type { Props as ReactSelectProps } from 'react-select';

in v3.8.0 is being transformed to

import { ReactSelectProps } from 'react-select';

but ReactSelectProps doesn't exist in react-select as it was an alias that was being used.

v3.7.3 works and looks like:

import type { Props as Props_2 } from 'react-select';

Reproduction

https://stackblitz.com/edit/vitejs-vite-aeyi1j?file=dist%2Findex.tsx.es.d.ts

Steps to reproduce

Running npm run build with the Vite config in the stackblitz gives the result in the /dist folder.

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 150.53 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node
    npm: 8.19.4 - ~/Sites/mm-ui-components/node_modules/.bin/npm
    pnpm: 7.28.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.86
    Edge: 123.0.2420.53
    Safari: 17.4.1
  npmPackages:
    vite: ^5.0.10 => 5.2.6 
    vite-plugin-dts: 3.7.3 => 3.7.3

Validations

@qmhc qmhc added pending Need further confirmation bug Something isn't working and removed pending Need further confirmation labels Mar 28, 2024
@qmhc qmhc closed this as completed in fb320fb Mar 28, 2024
@jeremydrichardson
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants