aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 03709d4..a59b38a 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -62,12 +62,22 @@ getHomeR = do
getBundleR :: Handler TypedContent
getBundleR = do
cacheSeconds $ 60 * 60 * 24 * 7
- return $ TypedContent typeJavascript $ toContent ($(embedFile "build/bundle.js"))
+ noEmbed <- confNoEmbed . config <$> getYesod
+ bundle <- liftIO $ bool
+ (pure $ toContent ($(embedFile "build/bundle.js")))
+ (toContent <$> readFile "../build/bundle.js")
+ noEmbed
+ return $ TypedContent typeJavascript bundle
getStyleR :: Handler TypedContent
getStyleR = do
cacheSeconds $ 60 * 60 * 24 * 7
- return $ TypedContent typeCss $ toContent ($(embedFile "build/style.css"))
+ noEmbed <- confNoEmbed . config <$> getYesod
+ stylesheet <- liftIO $ bool
+ (pure $ toContent ($(embedFile "build/style.css")))
+ (toContent <$> readFile "../build/style.css")
+ noEmbed
+ return $ TypedContent typeCss stylesheet
getBangsR :: Handler TypedContent
getBangsR = do