Skip to content
New issue

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

Emit compiled js/map for each file too? (i.e. not bundled) #49

Closed
ericanderson opened this issue Jan 12, 2018 · 2 comments
Closed

Emit compiled js/map for each file too? (i.e. not bundled) #49

ericanderson opened this issue Jan 12, 2018 · 2 comments
Labels
kind: support Asking for support with something or a specific use case scope: upstream Issue in upstream dependency solution: already possible This is already possible / this feature already exists solution: Rollup behavior This is Rollup's behavior and not specific to this plugin

Comments

@ericanderson
Copy link

In my builds, I would like to write the compiled source to disk. That way you can get the rolledup version by default but one could require just what you want in certain scenarios

@ezolenko
Copy link
Owner

Best way to do that would be running tsc on the side (don't forget to set outDir in tsconfig). Plugin uses most of the options from tsconfig (check readme for list of options it changes), so you will end up with the same code, minus any changes other rollup plugins do.

@ezolenko ezolenko closed this as completed Feb 8, 2018
@agilgur5 agilgur5 changed the title Emit compiled js/map too? Emit compiled js/map for each file too? (i.e. not bundled) May 25, 2022
@agilgur5 agilgur5 added kind: support Asking for support with something or a specific use case solution: out-of-scope This is out of scope for this project labels May 25, 2022
@agilgur5
Copy link
Collaborator

agilgur5 commented May 25, 2022

You can use Rollup's preserveModules feature for this.
Although it won't be bundled at all that way.

If you know what files are going to be used ahead-of-time (i.e. you've defined a public API), you can also use Rollup's multi-entry feature instead by specifying multiple inputs as an array or object.

That will create multiple bundles and shared chunks for any code that two or more bundles use.
Note that you may run into #136 that way, but there are workarounds for that.

@agilgur5 agilgur5 added scope: upstream Issue in upstream dependency solution: already possible This is already possible / this feature already exists labels May 25, 2022
Repository owner locked as resolved and limited conversation to collaborators May 25, 2022
@agilgur5 agilgur5 added solution: Rollup behavior This is Rollup's behavior and not specific to this plugin solution: already possible This is already possible / this feature already exists and removed solution: already possible This is already possible / this feature already exists solution: out-of-scope This is out of scope for this project labels Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind: support Asking for support with something or a specific use case scope: upstream Issue in upstream dependency solution: already possible This is already possible / this feature already exists solution: Rollup behavior This is Rollup's behavior and not specific to this plugin
Projects
None yet
Development

No branches or pull requests

3 participants