Webpacker: add erb extensions to paths.yml?

Created on 17 Apr 2017  路  3Comments  路  Source: rails/webpacker

I just spent a considerable amount of time debugging why my application wasn't working once I tried to add .erb components to my webpacker setup

since I'm not that knowledgeable about webpack, I thought this was a loader issue, but it turns out it worked after changing the imports to have an explicit extension:

`import Search from './search.jsx.erb'; // this was not working without the extensions

After some more fiddling, I found that adding .jsx.erb to the paths.yml file, this is no longer necessary

So my question is, should we add things like .jsx.erb and .js.erb to that file by default? Did I do something wrong, and should those not be necessary?

help wanted

Most helpful comment

Probably need to add the extensions config part in documentation so it's more clear.

All 3 comments

Probably need to add the extensions config part in documentation so it's more clear.

I just went through the same process as @naps62. Shouldn't the generated path.yml include these extension by default?

Also how can I help? I see there's PR #372 to overhaul the documentation so I'm not sure about the meaning of the help wanted label.

Fixed in #403

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ijdickinson picture ijdickinson  路  3Comments

FrankFang picture FrankFang  路  3Comments

pioz picture pioz  路  3Comments

amandapouget picture amandapouget  路  3Comments

ytbryan picture ytbryan  路  3Comments