From f0c03a9b8e15387c4defd0a0e3e0298324406fae Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Mon, 28 Aug 2023 21:33:44 -0500 Subject: Add wg2nd --- plugins/withMarkdownLoader.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/withMarkdownLoader.js b/plugins/withMarkdownLoader.js index c1e0ac6..f56af0e 100644 --- a/plugins/withMarkdownLoader.js +++ b/plugins/withMarkdownLoader.js @@ -1,8 +1,11 @@ const pluginFactory = require('./pluginFactory'); const markedOptions = require('../utils/markedOptions'); - +const path = require('path'); const withMarkdownLoader = pluginFactory((config, _options) => { + + const loaderPath = path.join(__dirname, '..', 'loaders', 'marked.js'); + config.module.rules.push({ test: /\.md$/, use: [ @@ -13,11 +16,11 @@ const withMarkdownLoader = pluginFactory((config, _options) => { } }, { - loader: 'markdown-loader', + loader: path.resolve(loaderPath), options: markedOptions } ] }); }); -module.exports = withMarkdownLoader; \ No newline at end of file +module.exports = withMarkdownLoader; -- cgit v1.2.3