This repository has been archived by the owner on Nov 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade babel & webpack config
- Loading branch information
Showing
13 changed files
with
2,175 additions
and
2,607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const presets = [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
modules: false, | ||
useBuiltIns: 'usage', | ||
corejs: 3, | ||
targets: { | ||
chrome: 70 | ||
} | ||
} | ||
], | ||
[ | ||
'@babel/preset-react', | ||
{ | ||
runtime: 'automatic' | ||
} | ||
] | ||
]; | ||
const plugins = [ | ||
process.env.NODE_ENV == 'development' && 'react-refresh/babel', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-proposal-class-properties', | ||
'@babel/plugin-proposal-json-strings', | ||
'@babel/plugin-proposal-nullish-coalescing-operator' | ||
].filter(Boolean); | ||
|
||
module.exports = { presets, plugins }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.