Closed paulomfr closed 1 year ago
Be able to import images and fonts from resources folder.
The Webpack configuration is not finding my images files from images folder, this appear that is a missing configuration in file-loader.
file-loader
{ test: utils.tests.images, use: [ { loader: 'file-loader', options: { name: file => `images/[name].${utils.filehash(file).substr(0, 10)}.[ext]`, publicPath: `/app/plugins/plugin-name/dist/` }, }, ], },
By adding a publicPath you can solve this.
publicPath
Hey @paulomfr thank you for your contribution.
The publicPath should be a generic thing, we can't lock the ppl to use WordPress Bedrock structure.
Version
Expected behavior
Be able to import images and fonts from resources folder.
Actual behavior
The Webpack configuration is not finding my images files from images folder, this appear that is a missing configuration in
file-loader
.Comments
By adding a
publicPath
you can solve this.