mrsum / webpack-svgstore-plugin

Simple svg-sprite creating with webpack
https://www.npmjs.com/package/webpack-svgstore-plugin
200 stars 92 forks source link

init is always null in __svg__ variable declaration #144

Open maqduni opened 7 years ago

maqduni commented 7 years ago

Somehow svg doesn't get assigned evaluated expression values. createTaskContext fails on

expr.init.properties.forEach(function (prop) {
      switch (prop.key.name) {
        case 'name':
          data.fileName = prop.value.value;
          break;
        case 'path':
          data.path = prop.value.value;
          break;
        default:
          break;
      }
    });

Am I doing something wrong, or it's just an error?

DavidKk commented 6 years ago

Me too...

image

image

This error occurs when I use webpack-svgstore-plugin and istanbul-instrumenter-loader. Now I can only exclude svgstore.config.js