Skip to content

Commit

Permalink
Merge pull request #69 from Thiht/fix/antd
Browse files Browse the repository at this point in the history
fix: parcel config for building antd components
  • Loading branch information
Thiht authored Feb 10, 2020
2 parents 8acd469 + 872332b commit a0b2fc5
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 194 deletions.
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": ["@babel/preset-env"],
"plugins": [
[
"import",
{
"libraryName": "antd",
"libraryDirectory": "es",
"style": "css"
}
]
]
}
1 change: 0 additions & 1 deletion client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from "react";
import { render } from "react-dom";
import App from "~components/App";
import "antd/dist/antd.css";

render(<App />, document.getElementById("root"));

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"predocs:generate": "yarn add --peer --pure-lockfile puppeteer"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.4",
"@hot-loader/react-dom": "^16.10.2",
"@types/classnames": "^2.2.9",
"@types/codemirror": "0.0.81",
Expand All @@ -24,6 +26,7 @@
"@types/react-router-dom": "^5.1.0",
"@types/redux": "^3.6.0",
"axios": "^0.19.2",
"babel-plugin-import": "^1.13.0",
"husky": ">=1",
"lint-staged": ">=8",
"parcel": "^1.12.4",
Expand Down
9 changes: 6 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
"compilerOptions": {
"baseUrl": "./client/src",
"allowSyntheticDefaultImports": true,
"module": "commonjs",
"module": "esnext",
"target": "es5",
"lib": ["es6", "dom"],
"sourceMap": true,
"allowJs": false,
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"importHelpers": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"removeComments": true,
"forceConsistentCasingInFileNames": true,
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
"paths": {
"~*": ["./*"]
}
},
"include": ["client/src/**/*"],
"exclude": ["node_modules"]
"exclude": ["node_modules", "build"]
}
Loading

0 comments on commit a0b2fc5

Please sign in to comment.