Closed byteab closed 3 years ago
I'm not sure what you mean by not working, and what yalc has to do with the exports
field.
I want to import a sub module defined inside "exports" field, but as it seems a local package added by yalc not respect package.json
exports
field.
so it's not possible to do import vanilla foo/vanilla
by yalc not respect package.json exports field.
How yalc should respect exports
field?
I am really sorry, it was my mistake.
I seem to have a similar issue... but...
running npm publish --dry-run
prints out:
npm notice === Tarball Contents ===
npm notice 655B package.json
npm notice 3.0kB src/AuthorizedApiBase.test.ts
npm notice 904B src/AuthorizedApiBase.ts
npm notice 1.5kB tsconfig.json
From here I could tell that yalc and npm are doing the same thing. Yalc is doing everything correctly, something about our package.json config/setup is wrong...
my main
field was ./dist/index.cjs
- the ./
prefix ruined the whole thing somehow... clearly I made a mistake but yalc+npm tried to smooth it over..
changing it to just dist/index.cjs
fixed the issue.
I also added "files": ["dist"],
to avoid included src
files and tsconfig.json.
import middleware from 'foo/middleware'
not working