
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
svg-inline-loader
Advanced tools
This Webpack loader inlines SVG as module. If you use Adobe suite or Sketch to export SVGs, you will get auto-generated, unneeded crusts. This loader removes it for you, too.
npm install svg-inline-loader --save-dev
Simply add configuration object to module.loaders like this.
    {
        test: /\.svg$/,
        loader: 'svg-inline-loader'
    }
warning: You should configure this loader only once via module.loaders or require('!...'). See #15 for detail.
removeTags: booleanRemoves specified tags and its children. You can specify tags by setting removingTags query array.
default: removeTags: false
removingTags: [...string]warning: this won't work unless you specify removeTags: true
default: removingTags: ['title', 'desc', 'defs', 'style']
warnTags: [...string]warns about tags, ex: ['desc', 'defs', 'style']
default: warnTags: []
removeSVGTagAttrs: booleanRemoves width and height attributes from <svg />.
default: removeSVGTagAttrs: true
removingTagAttrs: [...string]Removes attributes from inside the <svg />.
default: removingTagAttrs: []
warnTagAttrs: [...string]Warns to console about attributes from inside the <svg />.
default: warnTagAttrs: []
classPrefix: boolean || stringAdds a prefix to class names to avoid collision across svg files.
default: classPrefix: false
idPrefix: boolean || stringAdds a prefix to ids to avoid collision across svg files.
default: idPrefix: false
// Using default hashed prefix (__[hash:base64:7]__)
var logoTwo = require('svg-inline-loader?classPrefix!./logo_two.svg');
// Using custom string
var logoOne = require('svg-inline-loader?classPrefix=my-prefix-!./logo_one.svg');
// Using custom string and hash
var logoThree = require('svg-inline-loader?classPrefix=__prefix-[sha512:hash:hex:5]__!./logo_three.svg');
See loader-utils for hash options.
Preferred usage is via a module.loaders:
    {
        test: /\.svg$/,
        loader: 'svg-inline-loader?classPrefix'
    }
| Juho Vepsäläinen | Joshua Wiens | Kees Kluskens | Sean Larkin | 
0.8.2 (2020-02-17)
<a name="0.8.1"></a>
FAQs
Cleans up and inlines your SVG files into Webpack module.
The npm package svg-inline-loader receives a total of 153,215 weekly downloads. As such, svg-inline-loader popularity was classified as popular.
We found that svg-inline-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.