Open acallaghan opened 3 years ago
Any ideas how to adapt the loader?
First step is to add webpack 5 to the test suite here:
https://github.com/usabilityhub/rails-erb-loader/blob/233db82e5742fa4e8775bdb081391a743b55d902/.travis.yml#L16-L18 https://github.com/usabilityhub/rails-erb-loader/blob/233db82e5742fa4e8775bdb081391a743b55d902/package.json#L15-L17
However, it sounds as though you're simply providing the options to rails-erb-loader is an old way that is not longer valid:
configuration has an unknown property 'use'.
Additionally it sounds like the API for reading options may have changed:
For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration. Loaders should be updated to allow passing options via loader options in module.rules.
Note that in making required changes (if any) we will also need to continue to support older versions of webpack.
Additionally for this change to be complete we will need to update the README to show the current recommended way to configure webpack 5.
Do you need to do work to support the new webpack 5 plugin API?
I myself will not be making this change, but will happily accept a PR that does so, provided the above is included, or explanation is given as to why it was not required.
Webpacker 6 has already included a default rule for .erb
files with rails-erb-loader
as loader
(When the module rails-erb-loader
can be resolved)
@PikachuEXE Ah this is correct, and yes it 'just works' in webpacker 6 without any user config at all - thank you very much.
Reopening until we can confirm compatibility with webpack 5.
Hi there, So i'm testing out Webpacker 6 which uses webpack 5 - I'm having trouble initializing the loader.
Which gives me this error
Any ideas how to adapt the loader? Do you need to do work to support the new webpack 5 plugin API?