-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): update @rollup/plugin-babel usage to fix UMD build (#199)
- Loading branch information
Showing
2 changed files
with
29 additions
and
24 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 |
---|---|---|
@@ -1,18 +1,9 @@ | ||
const test = process.env.NODE_ENV === 'test'; | ||
// Note: this Babel config file is only used by Jest (babel-jest) when running | ||
// tests. Babel configuration for build outputs is in rollup.config.js. | ||
|
||
module.exports = { | ||
plugins: ['babel-plugin-annotate-pure-calls'], | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
modules: test ? 'commonjs' : false, | ||
targets: { | ||
browsers: ['> 1%', 'last 2 versions'], | ||
node: '12.16', | ||
}, | ||
}, | ||
], | ||
['@babel/preset-env', { targets: { node: 'current' } }], | ||
'@babel/preset-typescript', | ||
], | ||
}; |
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