Skip to content

Commit

Permalink
#924 add extra assembly references to SPA/web projects only
Browse files Browse the repository at this point in the history
  • Loading branch information
Jand42 committed Mar 13, 2018
1 parent 059a7e2 commit 7c6140d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/compiler/WebSharper.CSharp/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ let Compile config =
ModifyAssembly (Some comp) refMeta
(comp.ToCurrentMetadata(config.WarnOnly)) config.SourceMap config.AnalyzeClosures assem

AddExtraAssemblyReferences wsRefs assem
match config.ProjectType with
| Some (Bundle | Website) ->
AddExtraAssemblyReferences wsRefs assem
| _ -> ()

PrintWebSharperErrors config.WarnOnly comp

Expand Down
13 changes: 8 additions & 5 deletions src/compiler/WebSharper.FSharp/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,14 @@ let Compile (config : WsConfig) (warnSettings: WarnSettings) =
ModifyAssembly (Some comp) (getRefMeta())
(comp.ToCurrentMetadata(config.WarnOnly)) config.SourceMap config.AnalyzeClosures assem

let wsRefs =
match wsRefsMeta.Result with
| Some (r, _, m) -> r
| _ -> []
AddExtraAssemblyReferences wsRefs assem
match config.ProjectType with
| Some (Bundle | Website) ->
let wsRefs =
match wsRefsMeta.Result with
| Some (r, _, m) -> r
| _ -> []
AddExtraAssemblyReferences wsRefs assem
| _ -> ()

PrintWebSharperErrors config.WarnOnly config.ProjectFile comp

Expand Down

0 comments on commit 7c6140d

Please sign in to comment.