Skip to content

Commit

Permalink
🔧 chore(config): 调整配置项
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 15, 2021
1 parent adf060a commit 36eb467
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions .fatherrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
entry: 'src/index.ts',
cjs: 'babel',
esm: 'babel',
target: 'node',
extraBabelPlugins: ['add-module-exports'],
};
3 changes: 0 additions & 3 deletions .gitpod.yml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.10",
"babel-loader": "^8.1.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-import": "^1.12.2",
"commitlint": "^11.0.0",
"commitlint-config-cz": "^0.13.1",
Expand Down
6 changes: 6 additions & 0 deletions packages/foo/.fatherrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const base = require('../../.fatherrc');

module.exports = {
...base,
target: 'browser',
};
10 changes: 8 additions & 2 deletions packages/foo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "foo",
"name": "@arvinxx/modules-foo",
"version": "1.0.0",
"files": [
"lib",
"es"
],
"dependencies": {
"@sigi/core": "^2.4.4",
"@sigi/devtool": "^2.4.4",
Expand All @@ -11,5 +15,7 @@
"react-dom": "^16.9.0",
"react-intl": "^5.10.1"
},
"scripts": {}
"scripts": {
"build": "father-build"
}
}
4 changes: 2 additions & 2 deletions packages/foo/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';

const Modules: FC = () => {
const Foo: FC = () => {
return <div>Hello! </div>;
};

export default Modules;
export default Foo;
3 changes: 2 additions & 1 deletion packages/foo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx"
"jsx": "react-jsx",
"skipLibCheck": true
}
}
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
//
/* Alias 路径 */
"baseUrl": ".",
"paths": {}
"paths": {},

/* 检查 */
"skipLibCheck": true
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6376,6 +6376,11 @@ babel-loader@8.2.2, babel-loader@^8.1.0:
make-dir "^3.1.0"
schema-utils "^2.6.5"

babel-plugin-add-module-exports@^1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/babel-plugin-add-module-exports/download/babel-plugin-add-module-exports-1.0.4.tgz#6caa4ddbe1f578c6a5264d4d3e6c8a2720a7ca2b"
integrity sha1-bKpN2+H1eMalJk1NPmyKJyCnyis=

babel-plugin-dva-hmr@^0.4.2:
version "0.4.2"
resolved "https://registry.npm.taobao.org/babel-plugin-dva-hmr/download/babel-plugin-dva-hmr-0.4.2.tgz#56cf3d49cc366fb191cd883e27ca42bddfd12735"
Expand Down

0 comments on commit 36eb467

Please sign in to comment.