Closed andreicek closed 8 years ago
One more thing: it should be added that all the files have to be required in the JavaScript in order for webpack to process them.
Eg. files.js
require('images/file1.jpg');
require('images/file2.jpg');
require('images/file3.jpg');
And then in application.js
(your entrypoint)
require('file');
This note can be placed under a new chapter of README: eg. Example. If needed also modify the example/
folder to mirror the usage.
And then you can use it in your HTML
<img src="#{webpack_asset_url('images/file1.jpg')}" alt="logo" />
This is done at PRs #13 and #14
In the readme there is already support for adding a new helper but it would be much better if there was also a way to monkey patch other helpers that will stop working.