Skip to content

(feat): add --preserveModules flag#535

Draft
agilgur5 wants to merge 1 commit into
jaredpalmer:masterfrom
agilgur5:preserveModules
Draft

(feat): add --preserveModules flag#535
agilgur5 wants to merge 1 commit into
jaredpalmer:masterfrom
agilgur5:preserveModules

Conversation

@agilgur5

@agilgur5 agilgur5 commented Mar 4, 2020

Copy link
Copy Markdown
Collaborator
  • this works the same way as Rollup's preserveModules option, leaving
    the module structure and not bundling any files together
    • format, env, and minify are used as directories instead of filename
      suffixes since the filename can't be changed without configuring
      output.entryFileNames (possibly a future improvement?)

Fixes #276, fixes #299, fixes #321 .
Might fix ##382 , but need to think about what to do with index.js.
Related to #367, #175, #365, #425

Things to Review / TODOs:

- this works the same way as Rollup's preserveModules option, leaving
  the module structure and not bundling any files together
  - format, env, and minify are used as directories instead of filename
    suffixes since the filename can't be changed without configuring
    output.entryFileNames (possibly a future improvement?)
@agilgur5

agilgur5 commented Mar 4, 2020

Copy link
Copy Markdown
Collaborator Author

I'm thinking that -- in the future as it would be very breaking -- it might make sense to have TSDX eventually use outDir and outFile to determine whether to use preserveModules or not. That way there's no flags to configure, it just follows whatever you have in your tsconfig.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: preserveModules Related to Rollup's preserveModules feature

Projects

None yet

1 participant