-
-
Notifications
You must be signed in to change notification settings - Fork 154
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Currently it seems pretty much all URLs are properly relativized when --relative is set, except for the precache_urls used in the serviceworker. The relevar file is mint/src/utils/service_worker.cr, in line 21, inside the function precache_urls. Using #321 as a reference it seems it's just a matter of using that same path_for() function instead of just concatenating the initial /.
The current code:
def precache_urls
files
.join(",\n") do |file|
%('/#{file.relative_to(DIST_DIR)}')
end
end
I believe the change would result in something like:
def precache_urls
files
.join(",\n") do |file|
path_for(file.relative_to(DIST_DIR))
end
end
Is it really that simple or did I miss something? If it is, I believe it could be pretty useful when relative paths are needed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working