Add webpack-svgstore-plugin


We’re using the webpack.config.js for run yarn build and we’ve added the webpack-svgstore-plugin for compile the svgs files like a new plugin after FriendlyErrorsWebpackPlugin

new FriendlyErrorsWebpackPlugin(),
new SvgStore({
// svgo options
svgoOptions: {
plugins: [
{ removeTitle: true }

Also the constant
const SvgStore = require(‘webpack-svgstore-plugin’);

Besides, we’ve installed the loader GitHub - webpack-contrib/svg-inline-loader: Inline SVG loader with cleaning-up functionality and added to the config rules:

include: config.paths.assets + ‘/svg’,
loader: ‘svg-inline-loader’,
options: {
limit: 4096,
name: [path]${assetsFilenames}.[ext],

We’ve followed the intructions in the plugin web, but doesn’t appear any error in the command line. Only compiled succesfully.

we can only see the correct compilation of .css and .js

Finally we’ve chosen another plugin to that task:

In our plugins config we’ve specified the sources to grab the svgs and the exporte name to put into the dist folder.

new SVGSpritemapPlugin({
src: config.paths.assets +’/svg/*.svg’,
filename: ‘svg/foo.php’