parcel-antd
parcel-antd copied to clipboard
how to config with typescript
how to config with typescript?
i did it
@AntoninSorrento Congratulations! Would you mind sharing your solution for others to see?
@karol-majewski assuredly
Config with TypeScript
keep this package's config ,some file need change
1 change -> .babelrc
{
"presets": [
"@babel/preset-env"
],
"plugins": [
[
"import",
{
"libraryName": "antd",
"libraryDirectory": "es",
"style": true
}
]
]
}
2. add -> 'tsconfig.json'
{
"compilerOptions": {
"module": "esnext",
"target": "es5",
"lib": [
"es6",
"dom"
],
"moduleResolution": "node",
"rootDir": "src",
"jsx": "react",
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true
},
"exclude": [
"node_modules",
"build"
]
}
3. check package.json
start now!
Thank you @AntoninSorrento!
Thank you @AntoninSorrento