Hello,
You can extend the webpack for a pluggable widget by following the below:
Webpack extensibility
To extend the current webpack configurations and add your own custom features, you can create a file inside the root of your project with the files webpack.config.dev.js
or webpack.config.prod.js
according to your necessity.
From https://github.com/mendix/pluggable-widgets-tools
I have used the file loader in another project and used the following:
const customConfig = {
module: {
rules: [
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
},
],
},
],
},
};