const pluginFactory = require('./pluginFactory'); const markedOptions = require('../utils/markedOptions'); const withMarkdownLoader = pluginFactory((config, _options) => { config.module.rules.push({ test: /\.md$/, use: [ { loader: 'html-loader', options: { esModule: true } }, { loader: 'markdown-loader', options: markedOptions } ] }); }); module.exports = withMarkdownLoader;