From 59622930c7b38da514b4de2df72c4c43ef72616e Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Sun, 23 Feb 2020 19:18:30 +0000 Subject: [PATCH] Fix the problem that minified assets in dist/ are not used. --- src/static_handler.cr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/static_handler.cr b/src/static_handler.cr index 9162b00..c7f9cac 100644 --- a/src/static_handler.cr +++ b/src/static_handler.cr @@ -5,9 +5,11 @@ require "./util" class FS extend BakedFileSystem - {% if read_file? "./dist" %} + {% if read_file? "#{__DIR__}/../dist/favicon.ico" %} + {% puts "baking ../dist" %} bake_folder "../dist" {% else %} + {% puts "baking ../public" %} bake_folder "../public" {% end %} end