You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
489 B
30 lines
489 B
5 months ago
|
# Default browser runtime example
|
||
|
|
||
|
In browser sprite is rendered and injected in page automatically, you just refer to images via `<svg><use xlink:href="#id"></use></svg>`.
|
||
|
|
||
|
### [Demo](demo.html)
|
||
|
|
||
|
Input
|
||
|
|
||
|
```js
|
||
|
import twitterIcon from '../assets/twitter.svg';
|
||
|
```
|
||
|
|
||
|
Reference in HTML
|
||
|
|
||
|
```html
|
||
|
<svg>
|
||
|
<use xlink:href="#twitter"></use>
|
||
|
</svg>
|
||
|
```
|
||
|
|
||
|
### Input
|
||
|
|
||
|
- [main.js](main.js)
|
||
|
- [demo.html](demo.html)
|
||
|
- [webpack.config.js](webpack.config.js)
|
||
|
|
||
|
### Output
|
||
|
|
||
|
- [build/main.js](build/main.js)
|