usabilityhub / rails-erb-loader

Embedded Ruby (.erb) webpack loader for Ruby projects.
MIT License
103 stars 28 forks source link

Using with Shakapacker #135

Closed Overload119 closed 1 year ago

Overload119 commented 1 year ago

I'd like to use this gem. Any got it working with Shakapacker?

Unfortunately adding the installation instructions doesn't work.

I've renamed the file:

app/client/src/constants/proposalStatuses.js.erb

But I get:

Module not found: Error: Can't resolve './proposalStatuses' in '/Users/amirsharif/Projects/halo/app/client/src/constants'
 @ ./app/client/src/App.jsx 16:0-80 70:27-63 327:17-53 334:8-39 858:11-23 860:5-22 862:16-32
 @ ./app/client/packs/app.tsx 16:0-29 67:24-27
Overload119 commented 1 year ago

I managed to fix this by referencing the .erb part directly and adding the resolve statement in my config.