Describe the bug
I'm following the instructions in the README and I'm having troubles with this part to enable the auto-create anchors for the H tags.
Markdown({
markdownItOptions: {
html: true,
linkify: true,
typographer: true
},
markdownItSetup(md) {
// add anchor links to your H[x] tags
md.use(require('markdown-it-anchor'))
}
}),
The output of the error is:
> vite build
vite v4.0.3 building for production...
✓ 17 modules transformed.
[vite-plugin-md] Problem encountered during the "parser" stage of the vite-plugin-md transform pipeline:
Dynamic require of "file:///project-vite/node_modules/markdown-it-anchor/dist/markdownItAnchor.js" is not supported
Error: Dynamic require of "file:///project-vite/node_modules/markdown-it-anchor/dist/markdownItAnchor.js" is not supported
at file:///project-vite/vite.config.js.timestamp-1676580000016.mjs:6:9
at Object.markdownItSetup (file:///project-vite/vite.config.js.timestamp-1676580000016.mjs:59:16)
at file:///project-vite/node_modules/vite-plugin-md/dist/index.js:18016:19
at file:///project-vite/node_modules/vite-plugin-md/dist/index.js:17972:40
at file:///project-vite/node_modules/vite-plugin-md/dist/index.js:17515:28
at step (file:///project-vite/node_modules/vite-plugin-md/dist/index.js:17455:23)
at Object.next (file:///project-vite/node_modules/vite-plugin-md/dist/index.js:17402:18)
at file:///project-vite/node_modules/vite-plugin-md/dist/index.js:17388:71
at new Promise (<anonymous>)
at __awaiter (file:///project-vite/node_modules/vite-plugin-md/dist/index.js:17370:14)
do I need to install anything else?
Thanks!
Reproduction
private
System Info
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i7-5650U CPU @ 2.20GHz
Memory: 325.17 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
Browsers:
Chrome: 108.0.5359.124
Used Package Manager
npm
Validations
Describe the bug
I'm following the instructions in the README and I'm having troubles with this part to enable the auto-create anchors for the H tags.
The output of the error is:
do I need to install anything else?
Thanks!
Reproduction
private
System Info
System: OS: macOS Mojave 10.14.6 CPU: (4) x64 Intel(R) Core(TM) i7-5650U CPU @ 2.20GHz Memory: 325.17 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm Browsers: Chrome: 108.0.5359.124Used Package Manager
npm
Validations