Files
morten-olsen.github.io/webpage/plugins/with-markdown.js
Morten Olsen 3f5e941446 feat: init
2022-12-07 00:08:14 +01:00

19 lines
401 B
JavaScript

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;
},
});