Skip to content

appedemic/inline-svg-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html loader for webpack

Just a quick hack for now, will improve on it soon...

It converts <svg src="some.svg"> to an <svg> element with inlined contents of the file. The file is resolved through webpack.

Currently it only works as loader on top of html-loader and the regex is poor too.

You will need to setup loaders something like this:

{
  { test: "\.html$", loader: "inline-svg-loader!html-loader?attrs[]=svg:src" },
  { test: "\.svg$", loader: "raw-loader" }
}

About

Inline SVG loader for webpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published