Skip to content

Wrong typescript emit path if --cwd is used #643

@katywings

Description

@katywings

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions