Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jsartisan/9a01b00be8ccc6d27fe27fec8b66cb62 to your computer and use it in GitHub Desktop.
Save jsartisan/9a01b00be8ccc6d27fe27fec8b66cb62 to your computer and use it in GitHub Desktop.
Adding Image Loader
let imageLoaders = [
{
loader: 'url-loader',
options: {
limit: 5000000,
},
},
];
const config = {
// ...
module: {
rules: [
// ...
{
test: /\.(png|jpg|jpeg|svg)$/,
use: imageLoaders,
},
],
},
// ...
};
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment