This is a simple starter with typescript, react and webpack.
$ npm install
$ npm run dev
$ npm run build:(dev/prod)
- webpack-4.x
- babel-7.x
- typescript-3.x
- react-16.x
- import .(s)css auto generate .(s)css.d.ts by
css-modules-typescript-loader
- import svg icon as a component by
@svgr/webpack
- use ant design as UI framework
import React from 'react'
import { Button } from 'antd'
import * as styles from './index.scss'
import { test } from '@services/api'
const Test = () => {
const testFn = async () => {
const res = await test()
console.log(res)
}
return (
<div>
<div className={styles.test}>test</div>
<Button onClick={testFn} type="primary">
test
</Button>
</div>
)
}
export default Test