diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/withMarkdownLoader.js | 9 |
1 files changed, 6 insertions, 3 deletions
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; |