IS: If you use the cli cwd option to build a nested package xyz, the types are emitted into ./dist/.
SHOULD: Types should be emitted into the dist folder xyz/dist of the nested package.
DEMO:
REMARKS:
- If the devtools/lib/main.ts doesnt import something from an external, the ts emit path is different but still wrong:
dist/main.d.ts
- Not directly related to the cwd thing, but I noticed that the
--external cli option "freaks out" if the external has a dash character: microbundle prints: No name was provided for external module 'microbundle-test' in output.globals – guessing 'microbundleTest'. Doing the exact same bundle but naming the global "microbundletest" doesnt print this warning. (P.S. if you try this you also have to change the tsconfig.json path alias from microbundle-test to microbundletest)
IS: If you use the cli cwd option to build a nested package
xyz, the types are emitted into./dist/.SHOULD: Types should be emitted into the dist folder
xyz/distof the nested package.DEMO:
npm install && ./scripts/build-devtools.jsdist/devtools/lib/main.d.tsinstead ofdevtools/dist/main.d.tsREMARKS:
dist/main.d.ts--externalcli option "freaks out" if the external has a dash character:microbundleprints:No name was provided for external module 'microbundle-test' in output.globals – guessing 'microbundleTest'. Doing the exact same bundle but naming the global "microbundletest" doesnt print this warning. (P.S. if you try this you also have to change the tsconfig.json path alias from microbundle-test to microbundletest)