-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4858a1
commit 0091a2f
Showing
5 changed files
with
321 additions
and
616 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
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,29 @@ | ||
const BABEL_ENV = process.env.BABEL_ENV; | ||
const isCommonJS = BABEL_ENV !== undefined && BABEL_ENV === "cjs"; | ||
const isESM = BABEL_ENV !== undefined && BABEL_ENV === "esm"; | ||
|
||
module.exports = function (api) { | ||
api.cache(true); | ||
|
||
const presets = [ | ||
[ | ||
"@babel/env", | ||
{ | ||
loose: true, | ||
modules: isCommonJS ? "commonjs" : false, | ||
targets: { | ||
esmodules: isESM ? true : undefined, | ||
}, | ||
}, | ||
], | ||
"@babel/preset-typescript", | ||
"@babel/preset-react", | ||
]; | ||
|
||
const plugins = [["transform-css-import-to-string"]]; | ||
|
||
return { | ||
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
Oops, something went wrong.