diff --git a/components/version/index.tsx b/components/version/index.tsx index efc6dd2241..be283a3e94 100644 --- a/components/version/index.tsx +++ b/components/version/index.tsx @@ -1,3 +1,3 @@ -import * as pkg from '../../package.json'; +import { version } from '../../package.json'; -export default (pkg as any).version; +export default version; diff --git a/typings/custom-typings.d.ts b/typings/custom-typings.d.ts index 94ac115e8e..7e1ecb056a 100644 --- a/typings/custom-typings.d.ts +++ b/typings/custom-typings.d.ts @@ -86,5 +86,6 @@ declare var process: { declare module "*.json" { const value: any; + export const version: string; export default value; }