question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getting issue while using extract-svg-plugin

See original GitHub issue

I am trying to extract all svg icons and save them as an SVG bundle (in order to load them on page load). I’m using below configuration in my webpack. from here https://github.com/kisenka/svg-sprite-loader/issues/23

var ExtractSVGPlugin = require('svg-sprite-loader/lib/extract-svg-plugin');

module.exports = {
  module: {
    loaders: [
      {
        test: /\.svg$/,
        // extract=true is necessary option
        loader: ExtractSVGPlugin.extract('svg-sprite?extract=true')
      }
    ]
  },

  plugins: [
    new ExtractSVGPlugin('test.svg') // placeholders is not supported yet
  ]
};
node_modules\extract-text-webpack-plugin\index.js:221
return [this.loader(options)]
^

TypeError: this.loader is not a function
at ExtractSVGPlugin.ExtractTextPlugin.extract (node_modules\extract-text-webpack-plugin\index.js:221:15)
at Object. (config\webpack.config.dev.js:191:28)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\Miral\miral-FE\scripts\start.js:31:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)

Error is thrown from in extract-text-webpack-plugin.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kisenkacommented, Jul 27, 2017

@swesh please fill carefully the issue template, it contains useful information for me. I have no time to investigate your problem by myself.

0reactions
kisenkacommented, Oct 16, 2017

@swesh ping, still actual?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No extract svg sprite if use mini-css-extract-plugin #44 - GitHub
Hi,. I have a problem when i try to configure the the loader. The cssLoader is traying to resolve inline image from node_modules,...
Read more >
SVG Export Issue - Figma Community Forum
Hi Figma Community! I am currently experiencing an issue where my components created in figma do not export as svg's correctly.
Read more >
extract-svg-sprite-webpack-plugin - npm package | Snyk
Webpack plugin extract SVGs to separate file. Main purpose - extract images from CSS. But also works with SVGs imported from JS.
Read more >
SVG Export
SVG Export is a great tool that searches for SVGs on websites and enables you to rapidly export them as PNGs, JPEGs or...
Read more >
Export high-quality, optimized SVG - Adobe Illustrator
Note: If the Use Artboards checkbox is left unchecked, the SVG file's viewport will be set by the combined bounds of all the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found