Skip to content

Instantly share code, notes, and snippets.

@atomicpages
Created August 12, 2020 05:12
Show Gist options
  • Save atomicpages/2e735bc0c44e4b07194e43c8754dab58 to your computer and use it in GitHub Desktop.
Save atomicpages/2e735bc0c44e4b07194e43c8754dab58 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1" />
<polygon points="12 15 17 21 7 21 12 15" />
</svg>
import air_play from './icons/airplay.svg';
export { air_play };
{
"name": "demo_svgr",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@rollup/plugin-url": "^5.0.1",
"@svgr/rollup": "^5.4.0",
"rollup": "^2.23.1"
}
}
import svgr from '@svgr/rollup';
import url from '@rollup/plugin-url';
export default {
input: './src/index.js',
output: {
file: './build/index.js',
format: 'esm'
},
external: ['react'],
plugins: [
url(),
svgr(),
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment