mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
feat: init
This commit is contained in:
18
webpage/plugins/with-markdown.js
Normal file
18
webpage/plugins/with-markdown.js
Normal file
@@ -0,0 +1,18 @@
|
||||
exports.withMarkdown = (nextConfig = {}) => ({
|
||||
...nextConfig,
|
||||
webpack(config, options) {
|
||||
config.module.rules.push({
|
||||
test: /\.md$/,
|
||||
use: [
|
||||
{
|
||||
loader: require.resolve("@morten-olsen/markdown-loader"),
|
||||
},
|
||||
],
|
||||
});
|
||||
if (typeof nextConfig.webpack === "function") {
|
||||
return nextConfig.webpack(config, options);
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user