0.0.1 • Published 6 years ago
svgexport-loader v0.0.1
svgexport-loader
Load SVGs and export them as PNGs with Webpack!
Usage
Add the Webpack loader and specify the size PNGs you want:
{
test: /\.svg/,
loader: "svgexport-loader",
query: {
// Specify the sizes you want to create
sizes: [
{
width: '1024',
filename: 'logo-1024x1024.png'
},
{
width: '512',
filename: 'logo-512x512.png'
},
{
width: '128',
filename: 'logo-128x128.png'
},
{
width: '64',
filename: 'logo-64x64.png'
},
{
width: '32',
filename: 'logo-32x32.png'
},
]
}
},
Then import your SVGs:
import 'logo.svg'
That's it!
License
The code in this repository is licensed under MIT. View the license
assertible.com · GitHub @assertible · Twitter @AssertibleApp
0.0.1
6 years ago