Skip to content
15 changes: 13 additions & 2 deletions internal/bundler/bundler.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ func bundleJavascript(ctx BundleContext, dir string, outdir string, theproject *
return err
}

if err := possiblyCreateDeclarationFile(ctx.Logger, dir); err != nil {
return err
}

if err := runTypecheck(ctx, dir, installDir); err != nil {
return err
}
Expand Down Expand Up @@ -518,6 +522,7 @@ func bundleJavascript(ctx BundleContext, dir string, outdir string, theproject *

ctx.Logger.Debug("starting build")
started := time.Now()

result := api.Build(api.BuildOptions{
EntryPoints: entryPoints,
Bundle: true,
Expand All @@ -531,11 +536,17 @@ func bundleJavascript(ctx BundleContext, dir string, outdir string, theproject *
Engines: []api.Engine{
{Name: api.EngineNode, Version: "22"},
},
External: []string{"bun"},
External: []string{"bun", "fsevents"},
AbsWorkingDir: dir,
TreeShaking: api.TreeShakingTrue,
Drop: api.DropDebugger,
Plugins: []api.Plugin{createPlugin(ctx.Logger, dir, shimSourceMap)},
Plugins: []api.Plugin{
createPlugin(ctx.Logger, dir, shimSourceMap),
createYAMLImporter(ctx.Logger),
createJSONImporter(ctx.Logger),
createTextImporter(ctx.Logger),
createFileImporter(ctx.Logger),
},
Define: defines,
LegalComments: api.LegalCommentsNone,
Banner: map[string]string{
Expand Down
Loading
Loading