2016-12-21 02:01:56 +00:00
|
|
|
const babelRuntimePath = require.resolve('babel-runtime/package')
|
|
|
|
.replace(/[\\/]package\.json$/, '')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
presets: [
|
2017-01-31 06:31:27 +00:00
|
|
|
[require.resolve('babel-preset-es2015'), { modules: false }],
|
2016-12-21 02:01:56 +00:00
|
|
|
require.resolve('babel-preset-react')
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
require.resolve('babel-plugin-react-require'),
|
|
|
|
require.resolve('babel-plugin-transform-async-to-generator'),
|
|
|
|
require.resolve('babel-plugin-transform-object-rest-spread'),
|
|
|
|
require.resolve('babel-plugin-transform-class-properties'),
|
|
|
|
require.resolve('babel-plugin-transform-runtime'),
|
|
|
|
require.resolve('styled-jsx/babel'),
|
|
|
|
[
|
|
|
|
require.resolve('babel-plugin-module-resolver'),
|
|
|
|
{
|
|
|
|
alias: {
|
|
|
|
'babel-runtime': babelRuntimePath,
|
|
|
|
react: require.resolve('react'),
|
|
|
|
'react-dom': require.resolve('react-dom'),
|
2017-01-08 05:56:51 +00:00
|
|
|
'react-dom/server': require.resolve('react-dom/server'),
|
2016-12-21 02:01:56 +00:00
|
|
|
'next/link': require.resolve('../../../lib/link'),
|
|
|
|
'next/prefetch': require.resolve('../../../lib/prefetch'),
|
|
|
|
'next/css': require.resolve('../../../lib/css'),
|
|
|
|
'next/head': require.resolve('../../../lib/head'),
|
|
|
|
'next/document': require.resolve('../../../server/document'),
|
2016-12-22 13:00:11 +00:00
|
|
|
'next/router': require.resolve('../../../lib/router'),
|
2017-01-12 03:39:07 +00:00
|
|
|
'styled-jsx/style': require.resolve('styled-jsx/style')
|
2016-12-21 02:01:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|