mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Allow extending transform-runtime without loosing next defaults (#5022)
**Example:** https://github.com/zeit/next.js/blob/canary/examples/with-configured-preset-env/.babelrc#L17-L20
This commit is contained in:
parent
e11d08ae45
commit
d6676e6e2b
|
@ -37,9 +37,10 @@ module.exports = (context, opts = {}) => ({
|
|||
require('./plugins/react-loadable-plugin'),
|
||||
[require('@babel/plugin-proposal-class-properties'), opts['class-properties'] || {}],
|
||||
require('@babel/plugin-proposal-object-rest-spread'),
|
||||
[require('@babel/plugin-transform-runtime'), opts['transform-runtime'] || {
|
||||
[require('@babel/plugin-transform-runtime'), {
|
||||
helpers: false,
|
||||
regenerator: true
|
||||
regenerator: true,
|
||||
...opts['transform-runtime']
|
||||
}],
|
||||
[require('styled-jsx/babel'), styledJsxOptions(opts['styled-jsx'])],
|
||||
process.env.NODE_ENV === 'production' && require('babel-plugin-transform-react-remove-prop-types')
|
||||
|
|
Loading…
Reference in a new issue