-
Notifications
You must be signed in to change notification settings - Fork 121
files ending in _index.js
have index
replaced with an empty string
#215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ah, it does appear this is happening on purpose. I'm curious why? Should I rename my files? importmap-rails/lib/importmap/map.rb Line 144 in e0c1676
Looking at the rest of the repo it's not obvious as to why a file ending in |
It's happening to support that library/index.js can be referenced as library.js. But it's not intended that library_index.js is transformed. Please do explore a fix! |
Breaking down the regex, it's scanning for:
This is to try and match the following examples:
But because it looks for 0 or 1 I'm going to put together a PR updating this regex to
Which will still match
|
in my
config/importmap.rb
i have a chunk like this:and in
app/javascript/packs
these files:$ ls -d app/javascript/packs/*index.js app/javascript/packs/abi_qpcr_experiments_index.js app/javascript/packs/cycling_conditions_index.js app/javascript/packs/qc_ce_exo_experiment_index.js
and the resulting importmap in my html looks like:
is this expected behavior?
The text was updated successfully, but these errors were encountered: