mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
11 lines
302 B
JavaScript
11 lines
302 B
JavaScript
const nextBabelPreset = require('next/babel')
|
|
|
|
nextBabelPreset.plugins = nextBabelPreset.plugins.map(plugin => {
|
|
if (!Array.isArray(plugin) && plugin.indexOf('styled-jsx/babel') !== -1) {
|
|
return require.resolve('styled-jsx-postcss/babel')
|
|
}
|
|
return plugin
|
|
})
|
|
|
|
module.exports = nextBabelPreset
|