@@ -63,10 +63,6 @@ module Fable =
6363 | Watch
6464 | Clean
6565
66- type Webpack =
67- | WithoutWebpack
68- | WithWebpack of args : string option
69-
7066 type Args =
7167 { Command: Command
7268 Debug: bool
@@ -76,7 +72,7 @@ module Fable =
7672 Defines: string list
7773 SourceMaps: bool
7874 AdditionalFableArgs: string option
79- Webpack : Webpack }
75+ Bundle : bool }
8076
8177 let DefaultArgs =
8278 { Command = Build
@@ -87,7 +83,7 @@ module Fable =
8783 Defines = []
8884 AdditionalFableArgs = None
8985 SourceMaps = true
90- Webpack = WithoutWebpack }
86+ Bundle = false }
9187
9288 let private mkArgs args =
9389 let fableCmd =
@@ -122,24 +118,11 @@ module Fable =
122118
123119 let fableAdditionalArgs = args.AdditionalFableArgs |> Option.defaultValue " "
124120
125- let webpackCmd =
126- match args.Webpack with
127- | WithoutWebpack -> " "
128- | WithWebpack webpackArgs ->
129- sprintf
130- " --%s webpack %s %s %s "
131- ( match args.Command with
132- | Watch -> " runWatch"
133- | _ -> " run" )
134- ( if args.Debug then
135- " --mode=development"
136- else
137- " --mode=production" )
138- ( if args.Experimental then
139- " --env.ionideExperimental"
140- else
141- " " )
142- ( webpackArgs |> Option.defaultValue " " )
121+ let bundleCmd =
122+ if not args.Bundle then
123+ " "
124+ else
125+ " --run npm run esbuild"
143126
144127 let sourceMaps = if args.SourceMaps then " -s" else " "
145128
@@ -154,7 +137,7 @@ module Fable =
154137 fableExperimental
155138 fableDefines
156139 fableAdditionalArgs
157- webpackCmd
140+ bundleCmd
158141
159142 let run args =
160143 let cmd = mkArgs args
@@ -303,8 +286,7 @@ let initTargets () =
303286 Fable.run
304287 { Fable.DefaultArgs with
305288 Command = Fable.Watch
306- Debug = true
307- Webpack = Fable.WithWebpack None })
289+ Debug = true })
308290
309291 Target.create " InstallVSCE" ( fun _ ->
310292 Process.killAllByName " npm"
@@ -319,14 +301,13 @@ let initTargets () =
319301 { Fable.DefaultArgs with
320302 Command = Fable.Build
321303 Debug = false
322- Webpack = Fable.WithWebpack None })
304+ Bundle = true })
323305
324306 Target.create " RunDevScript" ( fun _ ->
325307 Fable.run
326308 { Fable.DefaultArgs with
327309 Command = Fable.Build
328- Debug = true
329- Webpack = Fable.WithWebpack None })
310+ Debug = true })
330311
331312
332313 Target.create " CopyFSACNetcore" ( fun _ ->
@@ -405,7 +386,8 @@ let buildTargetTree () =
405386 " YarnInstall" ==>! " RunScript"
406387 " DotNetRestore" ==>! " RunScript"
407388
408- " Clean" ==> " Format" ==> " RunScript" ==>! " Default"
389+ " Clean" ==> " Format" ==> " RunScript"
390+ ==>! " Default"
409391
410392 " Clean"
411393 ==> " RunScript"
0 commit comments