Home

Issue: 1072

Adding .md loaders to webpack

[issue link]

Hello, I’ve just started diving into nuxt and one thing I’m tasked with is finding a way to pull markdown files with front matter into nuxt.
I’ve found a couple good loaders for webpack, but when I attempt to use them I get an error:

This relative module was not found:
* ../content/about.md in ./store/index.js

The path is correct, because if I change the extension of the file, it loads fine. I found several solutions to loading markdown+front-matter, but none of them worked with nuxt.

here’s my build config after adding https://github.com/matthewwithanm/markdown-with-front-matter-loader to my packages.
build: { loaders: [ { test: /\.md$/, loaders: ['markdown-with-front-matter'] }, ], }

Please let me know of any known solutions.
Thanks,

  • Scott
This question is available on Nuxt.js community (#c937)