docz
docz copied to clipboard
Loader needed to use css-modules on mdx files
hey guys! i'm trying to use css-modules with docz, but i'm having a little bit troubles doing the configuration. I installed the docz css plugin and added:
export default {
title: 'Driver Sharing',
description: 'This is my awesome documentation',
plugins: [
css({
preprocessor: 'sass',
cssmodules: true,
loaderOpts: {
rules: [{
test: /.css$/,
use: ['style-loader', 'css-loader'],
}],
}
})
]
}
on my doczrc.js file
but when i try to import a style on a mdx file, i get the following error:
Failed to compile
./src/components/InputRounded/InputRounded.module.css 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
.container {
| color: #acb1c0;
| cursor: default;
Can anyone help me find out what i'm doing wrong?
@camilatropia Look at the workaround in this issue https://github.com/pedronauck/docz/issues/793