mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
6a0dbcdb31
Babel 7 moved to a new configuration format, and they've scoped all of their packages under `@babel/`. This brings MetaMask in-line with dependencies we use that _already_ use Babel 7, and it eliminates a few unfortunate edge cases that can prevent dependencies from being correctly transpiled.
25 lines
485 B
JavaScript
25 lines
485 B
JavaScript
module.exports = function (api) {
|
|
api.cache(false)
|
|
return {
|
|
presets: [
|
|
[
|
|
'@babel/preset-env',
|
|
{
|
|
targets: {
|
|
browsers: [
|
|
'chrome >= 58',
|
|
'firefox >= 60',
|
|
],
|
|
},
|
|
},
|
|
],
|
|
'@babel/preset-react',
|
|
],
|
|
plugins: [
|
|
'@babel/plugin-transform-runtime',
|
|
'@babel/plugin-proposal-class-properties',
|
|
'@babel/plugin-proposal-object-rest-spread',
|
|
],
|
|
}
|
|
}
|