Suggestion: Do not require -legacy
suffix when using vite_legacy_asset
#16
Labels
enhancement
New feature or request
-legacy
suffix when using vite_legacy_asset
#16
When using
vite_asset
, the syntax is:where
javascript/main.js
is the path to the source file.However, when using
vite_legacy_asset
, the syntax requires you to add the-legacy
suffix manually.I think this might be confusing because
javascript/main-legacy.js
is not a file that exists. When I usevite_legacy_asset
, I expect django-vite to load the legacy version of the file I specify.Another thing to consider is that
vite_legacy_asset
does not crash or give any warning when you don't add the-legacy
suffix. Currently, this just loads the non-legacy version of the asset with<script nomodule>
.I think many people will be caught out by this. I suggest that django-vite not require the
-legacy
suffix when usingvite_asset_legacy
.Keen to hear your thoughts on this.
The text was updated successfully, but these errors were encountered: