You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With target file name given, what we can do is checking the file name extension.
But what extensions are those of stylesheets?
The simplest solution is hard-coding the stylesheet extensions such as .css, .scss, .sass
or .less in the code then matching these against name argument. In this case, if users register a new file extension for stylesheets, these files will be treated as non-stylesheet one by webpacker.
More flexible solution is adding stylesheet_extensions field to webpacker.yml and using it in file type detection.
I think the later is preferable one but stylesheet extensions occur twice in a file. It's a bit redundant.
Do you have any ideas about how to solve this problem?
webpacker/lib/webpacker/helper.rb
Lines 13 to 17 in b5ec706
As long as I see above code,
asset_pack_path
returns empty in HMR mode.<%= asset_pack_path 'images/calendar.png' %>
So, this yields nothing.
I think assets other than stylesheets(
.png
,.svg
, etc) should be put byasset_pack_path
even in HMR mode.The text was updated successfully, but these errors were encountered: