Skip to content

Commit d25db43

Browse files
committed
Use Main_ for compile harness to prevent collissions with other tooling gen like elm-pages
1 parent fb491e0 commit d25db43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

extra/Lamdera/Compile.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ makeOptimizedWithCleanup cleanup root path = do
2424
debug $ "🏗 lamdera make --optimize " <> root <> "/" <> path
2525
let
2626
tmp = lamderaCache root <> "/tmp.js"
27-
scaffold = lamderaCache root <> "/Main.elm"
27+
scaffold = lamderaCache root <> "/Main_.elm"
2828

29-
writeUtf8 scaffold $ "module Main exposing (..)\n\nimport " <> (T.pack $ FP.takeFileName $ FP.dropExtensions path) <> "\nimport Html\n\nmain = Html.text \"\""
29+
writeUtf8 scaffold $ "module Main_ exposing (..)\n\nimport " <> (T.pack $ FP.takeFileName $ FP.dropExtensions path) <> "\nimport Html\n\nmain = Html.text \"\""
3030

3131
r <- async $
3232
Dir.withCurrentDirectory root $
@@ -107,11 +107,11 @@ makeHarnessDevJs :: FilePath -> IO ()
107107
makeHarnessDevJs root = do
108108
let
109109
tmp = lamderaCache root <> "/tmp.js"
110-
scaffold = lamderaCache root <> "/Main.elm"
110+
scaffold = lamderaCache root <> "/Main_.elm"
111111

112112
debug $ "🏗 lamdera make " <> scaffold
113113

114-
writeUtf8 scaffold "module Main exposing (..)\n\nimport Frontend\nimport Backend\nimport Types\nimport Html\n\nmain = Html.text \"\""
114+
writeUtf8 scaffold "module Main_ exposing (..)\n\nimport Frontend\nimport Backend\nimport Types\nimport Html\n\nmain = Html.text \"\""
115115

116116
r <- async $
117117
Dir.withCurrentDirectory root $

0 commit comments

Comments
 (0)