From dd0a4ab4d7e1abd2cb0dd3d272122e9908529fdf Mon Sep 17 00:00:00 2001 From: "Howard.Zuo" Date: Thu, 30 Apr 2020 11:20:35 +0800 Subject: [PATCH] feat: improve .svg usage --- generators/app/templates/typings.d.ts | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/generators/app/templates/typings.d.ts b/generators/app/templates/typings.d.ts index b93da34..dcc9b58 100644 --- a/generators/app/templates/typings.d.ts +++ b/generators/app/templates/typings.d.ts @@ -2,4 +2,6 @@ declare module '*.css' declare module '*.less' declare module '*.png' declare module '*.jpg' -declare module '*.svg' +declare module '*.svg' { + export function ReactComponent(props: React.SVGProps): React.ReactElement +} diff --git a/package.json b/package.json index 52e8c94..1cd332c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-umi", - "version": "4.2.2", + "version": "4.2.3", "description": "umi project generator", "scripts": { "docs:dev": "vuepress dev docs",