esbuild-plugin-svgr
Advanced tools
Comparing version 0.0.1 to 0.0.2
declare function svgrPlugin(options?: { | ||
configFile?: string; | ||
ext?: string; | ||
icon?: boolean; | ||
native?: boolean | object; | ||
typescript?: boolean; | ||
dimensions?: boolean; | ||
expandProps?: string; | ||
icon?: boolean; | ||
native?: boolean; | ||
typescript?: boolean; | ||
prettier?: boolean; | ||
prettierConfig?: object; | ||
ref?: boolean; | ||
memo?: boolean; | ||
ref?: boolean; | ||
replaceAttrValues?: object; | ||
svgProps?: object; | ||
svgo?: boolean; | ||
svgoConfig?: object; | ||
template?: unknown; | ||
titleProp?: boolean; | ||
runtimeConfig?: boolean; | ||
plugins?: unknown; | ||
namedExport?: string; | ||
template?: any; | ||
outDir?: string; | ||
indexTemplate?: any; | ||
ignoreExisting?: boolean; | ||
filenameCase?: string; | ||
}): { | ||
@@ -21,0 +20,0 @@ name: string; |
{ | ||
"name": "esbuild-plugin-svgr", | ||
"description": "A plugin for esbuild that enables importing *.svg files as React components.", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Kazi Jawad", |
# esbuild-plugin-svgr | ||
A plugin for [esbuild](https://github.com/evanw/esbuild) that adds support for `*.svg` file imports as React components. The plugin is built on top of [@svgr/core](https://react-svgr.com/docs/node-api/). | ||
A plugin for [esbuild](https://github.com/evanw/esbuild) that adds support for `*.svg` file imports as React components. The plugin is built on top of [SVGR](https://github.com/gregberge/svgr). | ||
@@ -11,3 +11,3 @@ ## Basic Usage | ||
# or use yarn | ||
yarn add --dev esbuild-plugin-svg | ||
yarn add --dev esbuild-plugin-svgr | ||
``` | ||
@@ -17,3 +17,3 @@ | ||
```js | ||
const svgrPlugin = require('esbuild-plugin-svgr') | ||
const svgrPlugin = require('esbuild-plugin-svgr'); | ||
@@ -24,3 +24,3 @@ esbuild.build({ | ||
], | ||
}) | ||
}); | ||
``` | ||
@@ -32,7 +32,9 @@ | ||
const App = () => ( | ||
<div> | ||
<Icon /> | ||
</div> | ||
); | ||
function App() { | ||
return ( | ||
<div> | ||
<Icon /> | ||
</div> | ||
); | ||
} | ||
``` | ||
@@ -46,3 +48,3 @@ | ||
], | ||
}) | ||
}); | ||
``` | ||
@@ -56,6 +58,6 @@ | ||
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/kazijawad/esbuild-plugin-svgr/blob/main/LICENSE.md) file for details | ||
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/kazijawad/esbuild-plugin-svgr/blob/main/LICENSE.md) file for details. | ||
## Acknowledgements | ||
[@svgr/core](https://github.com/gregberge/svgr/tree/master/packages/core) | ||
[SVGR](https://github.com/gregberge/svgr) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58
3932
38