Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat: babel支持ts4.5 import type语法 #285

Merged
merged 1 commit into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/emp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,24 @@
},
"author": "Ken",
"dependencies": {
"@babel/core": "^7.16.0",
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-proposal-decorators": "^7.16.0",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/plugin-transform-typescript": "^7.16.8",
"@babel/preset-env": "^7.16.0",
"@babel/preset-react": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@babel/runtime": "^7.16.3",
"babel-loader": "^8.2.3",
"babel-plugin-import": "^1.13.3",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"@svgr/webpack": "^5.5.0",
"@swc/core": "^1.2.171",
"@types/node": "^16.11.9",
"address": "^1.1.2",
"axios": "^0.21.4",
"babel-loader": "^8.2.3",
"babel-plugin-import": "^1.13.3",
"chalk": "^4.1.2",
"commander": "^8.3.0",
"compression": "^1.7.4",
Expand Down
1 change: 1 addition & 0 deletions packages/emp/src/webpack/loader/babel-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const babelLoader = () => {
],
[require.resolve('@babel/plugin-proposal-decorators'), {legacy: true}],
[require.resolve('@babel/plugin-proposal-class-properties'), {loose: true}],
[require.resolve('@babel/plugin-transform-typescript'), {onlyRemoveTypeImports: true}],
],
},
}
Expand Down
Loading