Skip to content

Commit

Permalink
fix: typecheck error
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed May 6, 2024
1 parent bd3135e commit 8fc0e60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/web/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module "*.svg" {
import type { ReactElement, SVGProps } from "react";

const content: (props: SVGProps<SVGElement>) => ReactElement;
export default content;
}
1 change: 1 addition & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const config = {

webpack(config) {
// Grab the existing rule that handles SVG imports
// @ts-ignore
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.(".svg"),
);
Expand Down

0 comments on commit 8fc0e60

Please sign in to comment.