Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In v5 can't use import * as styles with css modules, bug?

See original GitHub issue

Hello, after upgrading to v5 I can not use anymore named import such as

import * as styles from './Table.module.css';

This results in the following error

export 'table' (imported as 'styles') was not found in './Table.module.css' (possible exports: default)

Is this a bug? I can not find any workaround.

Thank you for any help.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:13
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

Hassan-98commented, Jun 10, 2022

you can use import classes from 'Table.module.css'

caal-15commented, Nov 15, 2022

Is there a fix for this? I am still facing this issue on v5.0.1 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to import CSS modules with Typescript, React and ...
Generate (or auto-generate) .d.ts files for CSS? And use classic Typescript import statement? With ./styles.css.d.ts : import * as styles from './styles.css'.
Read more >
style-loader - webpack
Automatically injects styles into the DOM using multiple <style></style> . It is default behaviour. ... import styles from "./styles.css"; const divElement = ...
Read more >
global css cannot be imported from within node_modules ...
css is not exported from package node_modules\primeng". Note1: importing styles in app styles.css like @import "~primeng/resources/primeng.css"; complies to the ...
Read more >
mini-css-extract-plugin - npm
Note that if you import CSS from your webpack entrypoint or import styles in the initial chunk, mini-css-extract-plugin will not load this ...
Read more >
Component-Scoped Styles with CSS Modules - Gatsby
The CSS in a CSS module is no different than normal CSS, but the extension of the file is different to mark that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found