diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2023-08-28 21:33:44 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2023-08-28 21:33:44 -0500 |
| commit | 2a308fb5bec47aac0f59e074d793cec6e95db1c3 (patch) | |
| tree | e8d8026ab7074ae1c273c819e049eb211309e04f /plugins/withMarkdownLoader.js | |
| parent | a0e64e73ef07c1cc3623d2712c483bf45884d350 (diff) | |
Add wg2nd
Diffstat (limited to 'plugins/withMarkdownLoader.js')
| -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; |
