We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm planning to use a local package for development.
It's package.json looks like this:
{ "main": "src/index.ts", "type": "module", "scripts": { "build": "tsc", }, "keywords": [], "exports": { "./src/*": "./src/*.ts", ".": "./src/index.ts", }, "publishConfig": { "access": "public", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { "./src/*": "./dist/*.js", ".": { "types": "./dist/index.d.ts", "module": "./dist/index.js", "import": "./dist/index.js" } } } }
(This package is inside a workspace, so we need it's non-publish exports default to ts file)
When linking this package to a project by:
yarn link -p ../workspace/project-name
All the imports are resolved to ts file but not js file after build.
System: OS: Linux 6.4 Arch Linux CPU: (12) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz Binaries: Node: 18.16.1 - /tmp/xfs-d4b44f58/node Yarn: 3.6.0 - /tmp/xfs-d4b44f58/yarn npm: 9.5.1 - ~/.config/nvm/versions/node/v18.16.1/bin/npm
No response
The text was updated successfully, but these errors were encountered:
Same to me. I use workspaces like:
project │ package.json │ └─── packages │ └─── my-lib │ │ └─── package.json │ │ │ │ │ └─── src │ │ │ └─── index.ts │ │ │ │ │ └─── dist │ │ └─── index.js │ │ └─── index.d.ts │ │ │ └─── my-tests-or-docs-or-something-else │ │ └─── src │ │ │ └─── index.ts
And it would be nice, If could use different export settings to use my-lib inside related workspaces and outisde, when it comes as a bundled package
my-lib
Sorry, something went wrong.
No branches or pull requests
Self-service
Describe the bug
I'm planning to use a local package for development.
It's package.json looks like this:
(This package is inside a workspace, so we need it's non-publish exports default to ts file)
When linking this package to a project by:
All the imports are resolved to ts file but not js file after build.
To reproduce
Environment
System: OS: Linux 6.4 Arch Linux CPU: (12) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz Binaries: Node: 18.16.1 - /tmp/xfs-d4b44f58/node Yarn: 3.6.0 - /tmp/xfs-d4b44f58/yarn npm: 9.5.1 - ~/.config/nvm/versions/node/v18.16.1/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: