Unverified Commit bf3b84bd authored by Will Binns-Smith's avatar Will Binns-Smith Committed by GitHub

`@next/mdx`: Use stable turbopack config options (#78261)

parent 35e6080e
......@@ -23,6 +23,9 @@ module.exports =
},
}
/**
* @type {import('next').NextConfig}
*/
let nextConfig = Object.assign({}, inputConfig, {
webpack(config, options) {
config.resolve.alias['next-mdx-import-source-file'] = [
......@@ -44,22 +47,16 @@ module.exports =
})
if (process.env.TURBOPACK) {
nextConfig.experimental = Object.assign({}, nextConfig?.experimental, {
turbo: Object.assign({}, nextConfig?.experimental?.turbo, {
rules: Object.assign({}, nextConfig?.experimental?.turbo?.rules, {
'*.mdx': {
loaders: [loader],
as: '*.tsx',
},
}),
resolveAlias: Object.assign(
{},
nextConfig?.experimental?.turbo?.resolveAlias,
{
'next-mdx-import-source-file':
'@vercel/turbopack-next/mdx-import-source',
}
),
nextConfig.turbopack = Object.assign({}, nextConfig?.turbopack, {
rules: Object.assign({}, nextConfig?.turbopack?.rules, {
'*.mdx': {
loaders: [loader],
as: '*.tsx',
},
}),
resolveAlias: Object.assign({}, nextConfig?.turbopack?.resolveAlias, {
'next-mdx-import-source-file':
'@vercel/turbopack-next/mdx-import-source',
}),
})
}
......
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