Skip to content

Commit

Permalink
✨ feat: 更新 react18 相关构建配置
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed May 9, 2023
1 parent e7ed9fe commit 4b5981e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 26 deletions.
3 changes: 1 addition & 2 deletions packages/bar/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import type { FC } from 'react';
import Foo from '@arvinxu/foo';
import type { FC } from 'react';

const Bar: FC = () => {
return (
Expand Down
13 changes: 1 addition & 12 deletions packages/bar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"jsx": "react-jsx",
"skipLibCheck": true,
/* 模块导入配置项 */
"esModuleInterop": true,
"baseUrl": "../..",
"paths": {
"@arvinxu/foo": ["./packages/foo/src"]
}
}
"extends": "../../tsconfig.json"
}
1 change: 0 additions & 1 deletion packages/foo/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { FC } from 'react';

const Foo: FC = () => {
Expand Down
9 changes: 1 addition & 8 deletions packages/foo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"jsx": "react-jsx",
"skipLibCheck": true,
/* 模块导入配置项 */
"esModuleInterop": true
}
"extends": "../../tsconfig.json"
}
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"compilerOptions": {
"noEmit": true,

"declaration": true,
/* 模块导入配置项 */
"moduleResolution": "Node",
"esModuleInterop": true,

"jsx": "react",
"jsx": "react-jsx",
/* 模块依赖 */
// 这些选项对 babel 编译 TypeScript 没有作用
// 但是可以让编辑器正确提示错误
Expand All @@ -21,6 +20,7 @@
"@arvinxu/foo": ["./packages/foo/src"],
"@arvinxu/bar": ["./packages/bar/src"]
},
"types": ["vitest/globals"],
/* 类型 */
"skipLibCheck": true
}
Expand Down

0 comments on commit 4b5981e

Please sign in to comment.