Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
appsaeed authored Apr 29, 2024
1 parent d827fe0 commit f3bdb45
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ pnpm install vite-svg

# Usage
Vite plugin configuration
**vite.config.js**
````js
import { defineConfig } from 'vite';
import viteSVG from 'vite-svg';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
viteSVG()
viteSVG({default: 'raw'})
],
});
````
Extract default options is box and now pass json
Extract default options in box and now pass JSON
````js
// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -50,7 +52,7 @@ console.log(javascript)
"url": "javascript.svg#"
}
```
## svg to json
## SVG to json
**Extract svg to json with all properties**
````js
import javascript from './javascript.svg?json'
Expand Down Expand Up @@ -93,4 +95,4 @@ console.log(javascript)

## License

[MIT](LICENSE)
[MIT](LICENSE)

0 comments on commit f3bdb45

Please sign in to comment.