Skip to content

Commit

Permalink
chore(typescript): Modify typescript config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 15, 2021
1 parent 19966d1 commit 81b99b2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 64 deletions.
3 changes: 3 additions & 0 deletions example/typescript/.kktrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ export default (conf: Configuration, env: 'development' | 'production', options:
VERSION: JSON.stringify(pkg.version),
}),
);
if (env === 'production') {
conf.output = { ...conf.output, publicPath: './' };
}
return conf;
};
6 changes: 6 additions & 0 deletions example/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
"@types/react-dom": "17.0.8",
"kkt": "6.10.4"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
Expand Down
9 changes: 9 additions & 0 deletions example/typescript/src/react-app-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ declare module '*.less' {
const classes: { readonly [key: string]: string };
export default classes;
}

declare module '*.svg' {
import * as React from 'react';

export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;

const src: string;
export default src;
}
64 changes: 0 additions & 64 deletions example/typescript/src/types/declare.d.ts

This file was deleted.

0 comments on commit 81b99b2

Please sign in to comment.