mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
Integrate CSS with bundler (#14281)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Zack Radisic <zackradisic@Mac.attlocal.net> Co-authored-by: zackradisic <zackradisic@users.noreply.github.com> Co-authored-by: Zack Radisic <zackradisic@Zacks-MBP.attlocal.net>
This commit is contained in:
@@ -280,6 +280,7 @@ pub const Arguments = struct {
|
||||
clap.parseParam("--minify-syntax Minify syntax and inline data") catch unreachable,
|
||||
clap.parseParam("--minify-whitespace Minify whitespace") catch unreachable,
|
||||
clap.parseParam("--minify-identifiers Minify identifiers") catch unreachable,
|
||||
clap.parseParam("--experimental-css Enabled experimental CSS bundling") catch unreachable,
|
||||
clap.parseParam("--dump-environment-variables") catch unreachable,
|
||||
clap.parseParam("--conditions <STR>... Pass custom conditions to resolve") catch unreachable,
|
||||
};
|
||||
@@ -777,6 +778,9 @@ pub const Arguments = struct {
|
||||
ctx.bundler_options.public_path = public_path;
|
||||
}
|
||||
|
||||
const experimental_css = args.flag("--experimental-css");
|
||||
ctx.bundler_options.experimental_css = experimental_css;
|
||||
|
||||
const minify_flag = args.flag("--minify");
|
||||
ctx.bundler_options.minify_syntax = minify_flag or args.flag("--minify-syntax");
|
||||
ctx.bundler_options.minify_whitespace = minify_flag or args.flag("--minify-whitespace");
|
||||
@@ -1398,6 +1402,7 @@ pub const Command = struct {
|
||||
emit_dce_annotations: bool = true,
|
||||
output_format: options.Format = .esm,
|
||||
bytecode: bool = false,
|
||||
experimental_css: bool = false,
|
||||
};
|
||||
|
||||
pub fn create(allocator: std.mem.Allocator, log: *logger.Log, comptime command: Command.Tag) anyerror!Context {
|
||||
|
||||
Reference in New Issue
Block a user