@@ -63,10 +63,6 @@ module Fable =
63
63
| Watch
64
64
| Clean
65
65
66
- type Webpack =
67
- | WithoutWebpack
68
- | WithWebpack of args : string option
69
-
70
66
type Args =
71
67
{ Command: Command
72
68
Debug: bool
@@ -76,7 +72,7 @@ module Fable =
76
72
Defines: string list
77
73
SourceMaps: bool
78
74
AdditionalFableArgs: string option
79
- Webpack : Webpack }
75
+ Bundle : bool }
80
76
81
77
let DefaultArgs =
82
78
{ Command = Build
@@ -87,7 +83,7 @@ module Fable =
87
83
Defines = []
88
84
AdditionalFableArgs = None
89
85
SourceMaps = true
90
- Webpack = WithoutWebpack }
86
+ Bundle = false }
91
87
92
88
let private mkArgs args =
93
89
let fableCmd =
@@ -122,24 +118,11 @@ module Fable =
122
118
123
119
let fableAdditionalArgs = args.AdditionalFableArgs |> Option.defaultValue " "
124
120
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"
143
126
144
127
let sourceMaps = if args.SourceMaps then " -s" else " "
145
128
@@ -154,7 +137,7 @@ module Fable =
154
137
fableExperimental
155
138
fableDefines
156
139
fableAdditionalArgs
157
- webpackCmd
140
+ bundleCmd
158
141
159
142
let run args =
160
143
let cmd = mkArgs args
@@ -303,8 +286,7 @@ let initTargets () =
303
286
Fable.run
304
287
{ Fable.DefaultArgs with
305
288
Command = Fable.Watch
306
- Debug = true
307
- Webpack = Fable.WithWebpack None })
289
+ Debug = true })
308
290
309
291
Target.create " InstallVSCE" ( fun _ ->
310
292
Process.killAllByName " npm"
@@ -319,14 +301,13 @@ let initTargets () =
319
301
{ Fable.DefaultArgs with
320
302
Command = Fable.Build
321
303
Debug = false
322
- Webpack = Fable.WithWebpack None })
304
+ Bundle = true })
323
305
324
306
Target.create " RunDevScript" ( fun _ ->
325
307
Fable.run
326
308
{ Fable.DefaultArgs with
327
309
Command = Fable.Build
328
- Debug = true
329
- Webpack = Fable.WithWebpack None })
310
+ Debug = true })
330
311
331
312
332
313
Target.create " CopyFSACNetcore" ( fun _ ->
@@ -405,7 +386,8 @@ let buildTargetTree () =
405
386
" YarnInstall" ==>! " RunScript"
406
387
" DotNetRestore" ==>! " RunScript"
407
388
408
- " Clean" ==> " Format" ==> " RunScript" ==>! " Default"
389
+ " Clean" ==> " Format" ==> " RunScript"
390
+ ==>! " Default"
409
391
410
392
" Clean"
411
393
==> " RunScript"
0 commit comments