1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-styled-jsx-postcss/babel-preset.js
2017-02-15 11:57:15 +01:00

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