Commit 990e39b1 authored by nkzawa's avatar nkzawa

replace babel-plugin-module-alias with babel-plugin-module-resolver

parent e2a7c5f0
...@@ -87,14 +87,16 @@ export default async function createCompiler (dir, { hotReload = false } = {}) { ...@@ -87,14 +87,16 @@ export default async function createCompiler (dir, { hotReload = false } = {}) {
'transform-class-properties', 'transform-class-properties',
'transform-runtime', 'transform-runtime',
[ [
'module-alias', 'module-resolver',
[ {
{ src: `npm:${babelRuntimePath}`, expose: 'babel-runtime' }, alias: {
{ src: `npm:${require.resolve('react')}`, expose: 'react' }, 'babel-runtime': babelRuntimePath,
{ src: `npm:${require.resolve('../../lib/link')}`, expose: 'next/link' }, react: require.resolve('react'),
{ src: `npm:${require.resolve('../../lib/css')}`, expose: 'next/css' }, 'next/link': require.resolve('../../lib/link'),
{ src: `npm:${require.resolve('../../lib/head')}`, expose: 'next/head' } 'next/css': require.resolve('../../lib/css'),
] 'next/head': require.resolve('../../lib/head')
}
}
] ]
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment