We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
According to the documentation, a custom callback can be passed to the Encore.configureFontRule() and Encore.configureImageRule() functions: https://github.com/symfony/webpack-encore/blob/main/index.js#L1457.
Encore.configureFontRule()
Encore.configureImageRule()
However, when using this callback to specify a custom generator, the filename option of the generator seems to get ignored:
filename
Encore .configureFontRule(rule => { rule.test = fontFileExtensionRegex; rule.generator = { filename: 'whatever/path/[name][ext]', }; });
The issue seems to be this default filename option: https://github.com/symfony/webpack-encore/blob/main/lib/WebpackConfig.js#L78.
Using the same example, explicitly setting filename to global.undefined in the regular options seems to fix the issue:
global.undefined
Encore .configureFontRule( { filename: global.undefined, }, rule => { rule.test = fontFileExtensionRegex; rule.generator = { filename: 'whatever/path/[name][ext]', }; }, );
The text was updated successfully, but these errors were encountered:
I guess we could execute the user’s callback first, then add filename after if both it and generator are undefined. PR welcome :)
Sorry, something went wrong.
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
No branches or pull requests
According to the documentation, a custom callback can be passed to the
Encore.configureFontRule()
andEncore.configureImageRule()
functions: https://github.com/symfony/webpack-encore/blob/main/index.js#L1457.However, when using this callback to specify a custom generator, the
filename
option of the generator seems to get ignored:The issue seems to be this default
filename
option: https://github.com/symfony/webpack-encore/blob/main/lib/WebpackConfig.js#L78.Using the same example, explicitly setting
filename
toglobal.undefined
in the regular options seems to fix the issue:The text was updated successfully, but these errors were encountered: