diff --git a/src/icons.svg b/public/icons.svg similarity index 100% rename from src/icons.svg rename to public/icons.svg diff --git a/src/element/icon.tsx b/src/element/icon.tsx index f70306a..bf3473c 100644 --- a/src/element/icon.tsx +++ b/src/element/icon.tsx @@ -1,5 +1,4 @@ import { MouseEventHandler } from "react"; -import IconsSvg from "icons.svg"; type Props = { name: string; @@ -10,7 +9,7 @@ type Props = { export function Icon(props: Props) { const size = props.size || 20; - const href = `${IconsSvg}#` + props.name; + const href = `/icons.svg#` + props.name; return ( diff --git a/webpack.config.js b/webpack.config.js index a08ce4a..4b5fcb6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -38,6 +38,7 @@ const config = { patterns: [ { from: "public/manifest.json" }, { from: "public/robots.txt" }, + { from: "public/icons.svg" }, { from: "_headers" }, ], }),