Skip to content

Commit

Permalink
kit + server component improvements
Browse files Browse the repository at this point in the history
you can use --server-components with bun build, and you get a slightly
more correct output. this output is not yet perfect or usable. but i am
committing this as a checkpoint as the next step is a large design
change for how `kit.DevServer` bundles and re-bundles files

we are removing the old `Framework` struct, and replacing it with a new
one with a similar purpose: configuration options targeted towards
framework developers. it tells the bundler how to glue the framework to
the application, mostly in regards to react server components

introduce `bundle_v2.AstBuilder`, which is used for parallel generation
of virtual modules. previously, this used a string builder combined with
the javascript parser. this is silly and will not be fun to use for the
3-5 file kinds that the bundler will have to generate. this builder
makes it very easy

introduce `kit.DevServer.IncrementalGraph`, which will keep track of
changes between bundle tasks. however, this code is not ripe and will
be iterated on extensively. i don't think it's approach is sound yet
  • Loading branch information
paperdave committed Sep 19, 2024
1 parent cf4e9cb commit a0956f2
Show file tree
Hide file tree
Showing 59 changed files with 2,749 additions and 2,305 deletions.
7 changes: 4 additions & 3 deletions .vscode/launch.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub fn build(b: *Build) !void {

// TODO: Upgrade path for 0.14.0
// b.graph.zig_lib_directory = brk: {
// const sub_path = "src/deps/zig/lib";
// const sub_path = "vendor/zig/lib";
// const dir = try b.build_root.handle.openDir(sub_path, .{});
// break :brk .{ .handle = dir, .path = try b.build_root.join(b.graph.arena, &.{sub_path}) };
// };
Expand Down Expand Up @@ -295,7 +295,7 @@ pub fn build(b: *Build) !void {
bun_check_obj.generated_bin = null;
step.dependOn(&bun_check_obj.step);

// The default install step will run zig build check This is so ZLS
// The default install step will run zig build check. This is so ZLS
// identifies the codebase, as well as performs checking if build on
// save is enabled.

Expand Down
4 changes: 0 additions & 4 deletions packages/bun-darwin-aarch64/.npmignore

This file was deleted.

4 changes: 0 additions & 4 deletions packages/bun-linux-x64/.npmignore

This file was deleted.

3 changes: 0 additions & 3 deletions packages/bun-plugin-css/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/bun-plugin-css/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/bun-plugin-css/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/bun-plugin-lightningcss/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/bun-plugin-lightningcss/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/bun-plugin-lightningcss/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/bun-plugin-mdx/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/bun-plugin-mdx/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/bun-plugin-mdx/package.json

This file was deleted.

169 changes: 0 additions & 169 deletions packages/bun-plugin-server-components/.gitignore

This file was deleted.

Loading

0 comments on commit a0956f2

Please sign in to comment.