Skip to content

Commit

Permalink
add SVGR module
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Jan 25, 2025
1 parent 5435d2b commit 55a9631
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const nextConfig: NextConfig = {
reactStrictMode: true,
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
test: /\.svg$/i,
use: ['@svgr/webpack']
});
return config;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Typography from "@/components/Typography/Typography";
import BackgroundImage from "@/components/BackgroundImage/BackgroundImage";
import CountdownTimer from "@/components/Countdown/Countdown"
import Container from "@/layouts/Container";
import MMFRFull from "./mmfr25-full.svg";
import MMFRFull from "/public/images/mmfr25-full.svg";

const Hero = () => {
return (
Expand Down
8 changes: 4 additions & 4 deletions src/layouts/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import About from "@/components/About/About";
import Typography from "@/components/Typography/Typography";
import {List as FooterMenu} from "@/components/List/List";
import Container from "@/layouts/Container";
import FooterLogo from "./logo_macaron.svg";
import HashtagMMFR from "./mmfr2025-footer.svg";
import FooterPatternLeft from "./footer_pattern_left.svg";
import FooterPatternRight from "./footer_pattern_right.svg";
import FooterLogo from "/public/images/logo_macaron.svg";
import HashtagMMFR from "/public/images/mmfr2025-footer.svg";
import FooterPatternLeft from "/public/images/footer_pattern_left.svg";
import FooterPatternRight from "/public/images/footer_pattern_right.svg";
import {Content, ListItem} from "@/components/List/List.types";
import {FaLinkedinIn, FaYoutube} from "react-icons/fa";
import Link from "next/link";
Expand Down
5 changes: 5 additions & 0 deletions svgr.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.svg' {
import { FC, SVGProps } from "react";
const content: FC<SVGProps<SVGElement>>;
export default content;
}
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": [
"svgr.d.ts",
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}

0 comments on commit 55a9631

Please sign in to comment.