-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use next-mdx-remote to render mdx from cms
- Loading branch information
1 parent
9f27db0
commit 91f19df
Showing
17 changed files
with
222 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"components": minor | ||
"design-system": minor | ||
"@lighting-beetle/next-lighter-config": minor | ||
--- | ||
|
||
Render MDX docs with next-mdx-remote to be able to SSG design system pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
const nextLighterConfig = require('@lighting-beetle/next-lighter-config'); | ||
const { extend } = require('next-compose-plugins'); | ||
const { resolve } = require('path'); | ||
const transpileModules = require('next-transpile-modules'); | ||
const nextLighterConfig = require("@lighting-beetle/next-lighter-config"); | ||
const { extend } = require("next-compose-plugins"); | ||
const { resolve } = require("path"); | ||
const transpileModules = require("next-transpile-modules"); | ||
|
||
const resolveComponents = (nextConfig = {}) => { | ||
return Object.assign({}, nextConfig, { | ||
webpack(config, options) { | ||
config.resolve.alias['components'] = resolve( | ||
config.resolve.alias["components"] = resolve( | ||
__dirname, | ||
'..', | ||
'components', | ||
'src' | ||
"..", | ||
"components", | ||
"src" | ||
); | ||
|
||
if (typeof nextConfig.webpack === 'function') { | ||
if (typeof nextConfig.webpack === "function") { | ||
return nextConfig.webpack(config, options); | ||
} | ||
|
||
return config; | ||
}, | ||
} | ||
}); | ||
}; | ||
|
||
// FIX | ||
// - this should work without .withPlugins([]), but that's probably bug in 'next-compose-plugins' | ||
module.exports = extend(nextLighterConfig()).withPlugins([ | ||
transpileModules(['components']), | ||
resolveComponents, | ||
transpileModules(["components"]), | ||
resolveComponents | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.