Skip to content

Commit

Permalink
#891 fix entry point call missing from bundles created from pre-compi…
Browse files Browse the repository at this point in the history
…led .js
  • Loading branch information
Jand42 committed Jan 31, 2018
1 parent 407ee74 commit 6634534
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/compiler/WebSharper.CSharp/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ let Compile config =
match config.ProjectType with
| Some (Bundle | BundleOnly) ->
let currentJS =
if isBundleOnly then
lazy CreateBundleJSOutput refMeta currentMeta
else lazy js
lazy CreateBundleJSOutput refMeta currentMeta
Bundling.Bundle config metas currentMeta currentJS sources refs
TimedStage "Bundling"
| Some Html ->
Expand Down
6 changes: 2 additions & 4 deletions src/compiler/WebSharper.Compiler/FrontEnd.fs
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,10 @@ let CreateBundleJSOutput refMeta current =

let getCodeWriter() = WebSharper.Core.JavaScript.Writer.CodeWriter()

let pu = P.PathUtility.VirtualPaths("/")
let inline getBytes (x: string) = System.Text.Encoding.UTF8.GetBytes x
let js, _ = pkg |> WebSharper.Compiler.Packager.exprToString WebSharper.Core.JavaScript.Readable getCodeWriter
TimedStage "Writing .js"
TimedStage "Writing .js for bundle"
let minJs, _ = pkg |> WebSharper.Compiler.Packager.exprToString WebSharper.Core.JavaScript.Compact getCodeWriter
TimedStage "Writing .min.js"
TimedStage "Writing .min.js for bundle"

Some (js, minJs)

Expand Down
4 changes: 1 addition & 3 deletions src/compiler/WebSharper.FSharp/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ let Compile (config : WsConfig) (warnSettings: WarnSettings) =
| Some (metas, _) -> metas
| _ -> []
let currentJS =
if isBundleOnly then
lazy CreateBundleJSOutput (getRefMeta()) currentMeta
else lazy js
lazy CreateBundleJSOutput (getRefMeta()) currentMeta
Bundling.Bundle config metas currentMeta currentJS sources refs
TimedStage "Bundling"
| Some Html ->
Expand Down

0 comments on commit 6634534

Please sign in to comment.