How to properly read markdown files in redwoodjs?

Hello All, I’m trying to read .md files and I’m getting this webpack error mesage

ERROR in ./src/pages/TermsPage/terms.md 1:1

Module parse failed: Unexpected character ' ' (1:1)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> # Allmänna villkor

Here’s my current setup

seems like webpack error or something.

In a prior Redwood project I had to add to my custom webpack config to make markdown files work.

web/config/webpack.config.js

// Add custom rules for your project
// config.module.rules.push(YOUR_RULE)
config.module.rules.push({
test: /.md$/,
use: ‘raw-loader’,
})

1 Like