0.2.2 • Published 4 years ago
@svg-component-generator/webpack-loader v0.2.2
@svg-component-generator/webpack-loader
Install
npm i @svg-component-generator/webpack-loader -D
Usage
Add @svg-component-generator/webpack-loader
to the rules config of the webpack.
rules: [{
test: /your-svg-folder\/.*\.svg$/,
use: [
{
loader: '@svg-component-generator/webpack-loader',
{
component: 'React',
target: 'jsx',
declaration: true
}
}
]
}]
Configuration
component
Type: React
Default: React
Specifies the component type.
target
Type: jsx | js
Default: jsx
Specifies the code
declaration
Type: Boolean
Default: false
指定是否生成类型文件(.d.ts),如果设置为true
,则类型文件会自动生成在图标在所文件夹中。
0.1.0
4 years ago
0.2.1
4 years ago
0.2.2
4 years ago
0.1.4-alpha.0
4 years ago
0.1.3-alpha.0
4 years ago
0.1.1-alpha.0
4 years ago