Forum Discussion
Túlio
2 years agoFrequent Visitor
How can I configure CSS modules to style my visual with react - powerbi-visuals-api
How can I access "styles.title" like the example below? import * as React from "react";
import styles from "./styles.module.css";
export class Visual implements IVisual {
con...
- 2 years ago
I changed the property "esModules" to false, which works for me.
{ test: /\.css$/, include: /\.module\.css$/, exclude: /node_modules/, use: [ 'style-loader', { loader: 'css-loader', options: { esModule: false, modules: { localIdentName: '[name]__[local]__[hash:base64:5]' } }, }, ], }
Anonymous
2 years agoNot applicable
This is not working for me. I'm still not able to import it as
import styles from "./styles.module.css";
Is there some other solution?
Túlio
2 years agoFrequent Visitor
I changed the property "esModules" to false, which works for me.
{
test: /\.css$/,
include: /\.module\.css$/,
exclude: /node_modules/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
esModule: false,
modules: {
localIdentName: '[name]__[local]__[hash:base64:5]'
}
},
},
],
}
- Anonymous2 years agoNot applicable
Hi, Túlio
We are very glad to know that the issue has been resolved. If you wish, consider accepting your solution as a solution that will also benefit other community members who have the same problem as you and find a solution faster.Of course, if there is anything else we can do for you, please do not hesitate to contact us.
Looking forward to your reply.
Best Regards,
Leroy Lu