-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
32 lines (26 loc) · 1.12 KB
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// const bsconfig = import('./bsconfig.json')
// const withMdxEnhanced = import('next-mdx-enhanced')
// const transpileModules = ['bs-platform']
// const transpileModules = ["rescript"].concat(bsconfig["bs-dependencies"]);
// const withTM = import('next-transpile-modules')(transpileModules)
// const withSourceMaps = import('@zeit/next-source-maps')
// const remarkFrontmatter = import('remark-frontmatter/index')
import bsconfig from './bsconfig.json' assert {type: "json"}
// import nextTranspileModules from 'next-transpile-modules'
import withSourceMaps from '@zeit/next-source-maps'
import remarkFrontmatter from 'remark-frontmatter'
import nextMdx from '@next/mdx'
const transpileModules = ["rescript", 'refractor'].concat(bsconfig["bs-dependencies"]);
// const withTM = nextTranspileModules(transpileModules)
const withMDX = nextMdx({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkFrontmatter],
rehypePlugins: [],
providerImportSource: "@mdx-js/react",
},
})
export default withSourceMaps(withMDX({
pageExtensions: ['jsx', 'js', 'bs.js', 'ts', 'tsx', 'md', 'mdx'],
transpilePackages: transpileModules
}));