You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
The main motivation for this issue is the same as #45, but I have more points to bring to the table.
I use the bundled version of Lit. I import that file in every Lit component I have, and packup build ends up adding the entire Lit bundle to every component.
Describe the solution you'd like
I'd like Packup to have an option to just transpile TS, without bundling. That would solve the problem for me.
Describe alternatives you've considered
Since esbuild supports transpiling without bundling, could Packup leverage esbuild commands? I was wondering if Packup could just forward to esbuild whatever commands Packup receives via CLI.
By doing that, we would automatically give the user the option to minify, mangle, add a footer, limit line length, tweak path resolution and everything else that esbuilds supports. Whenever esbuild adds a new feature, it could be easily added to Packup as well, and the docs would always be up to date because the user could refer to esbuild's docs.
So packup build would be become packup build --bundle (because esbuild takes the --bundle arg). And immediately we would support esbuild flags like --minify, --keep-names, --mangle-props, --minify-whitespace and others. Same thing for packup serve.
Caveats
I guess not all esbuild flags will work OOTB (e.g. code splitting). We could intercept those flags and inform the user that they are not supported yet.
Packup's own CLI args would be mixed with esbuild's args, which means they probably shouldn't have the same names. We could prefix Packup's args to avoid naming collisions with esbuild.
Let me know if you like the idea 👍.
The text was updated successfully, but these errors were encountered:
I'm not actively developing this project anymore. I'd accept small non-breaking PRs (like adding --no-bundle option), but if you like to see more fundamental changes (like supporting many of esbuild options) then I'd recommend you would start your own project (maybe forking this project)
Thank you for this very underrated project.
Is your feature request related to a problem? Please describe
The main motivation for this issue is the same as #45, but I have more points to bring to the table.
I use the bundled version of Lit. I
import
that file in every Lit component I have, andpackup build
ends up adding the entire Lit bundle to every component.Describe the solution you'd like
I'd like Packup to have an option to just transpile TS, without bundling. That would solve the problem for me.
Describe alternatives you've considered
Since esbuild supports transpiling without bundling, could Packup leverage esbuild commands? I was wondering if Packup could just forward to esbuild whatever commands Packup receives via CLI.
By doing that, we would automatically give the user the option to minify, mangle, add a footer, limit line length, tweak path resolution and everything else that esbuilds supports. Whenever esbuild adds a new feature, it could be easily added to Packup as well, and the docs would always be up to date because the user could refer to esbuild's docs.
So
packup build
would be becomepackup build --bundle
(because esbuild takes the--bundle
arg). And immediately we would support esbuild flags like--minify
,--keep-names
,--mangle-props
,--minify-whitespace
and others. Same thing forpackup serve
.Caveats
Let me know if you like the idea 👍.
The text was updated successfully, but these errors were encountered: