feat(bundler): inlining/dead-code-elimination for import.meta.main (and --compile) (#12867)

Co-authored-by: Meghan Denny <meghan@bun.sh>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
Co-authored-by: dylan-conway <dylan-conway@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: paperdave <paperdave@users.noreply.github.com>
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Andrew Johnston <apjohnsto@gmail.com>
Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
This commit is contained in:
dave caruso
2024-08-01 17:25:38 -07:00
committed by GitHub
parent 80eb6d00e8
commit 622432e843
14 changed files with 397 additions and 63 deletions

View File

@@ -102,6 +102,9 @@ pub const BuildCommand = struct {
this_bundler.options.react_server_components = ctx.bundler_options.react_server_components;
this_bundler.resolver.opts.react_server_components = ctx.bundler_options.react_server_components;
this_bundler.options.inline_entrypoint_import_meta_main = ctx.bundler_options.inline_entrypoint_import_meta_main;
this_bundler.resolver.opts.inline_entrypoint_import_meta_main = ctx.bundler_options.inline_entrypoint_import_meta_main;
this_bundler.options.code_splitting = ctx.bundler_options.code_splitting;
this_bundler.resolver.opts.code_splitting = ctx.bundler_options.code_splitting;