question-mark
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.

Doesn't export fields with css-loader ^4.0.0

See original GitHub issue

We are using css-modules-typescript-loader to generate our types with CSS modules, css-loader and sass.

I’m seeing an issue in the generated typescript files from css-modules-typescript-loader. When we update to css-loader version 4, the exports have no fields in CssExports.

This works fine with css-loader version 3.6.0 but issue appears when updating to css-loader version 4.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:14
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mydatahackcommented, Sep 22, 2020

For css-loader version 4 has different local export name from version 3. In the index.js file line 83, we can add function to make it work for both versions. See the pull request below for the fix.

3reactions
LeopoldLerchcommented, Sep 8, 2020

FYI: I ended up switching to

@teamsupercell/typings-for-css-modules-loader

as this repo seems no longer maintained. Worked with that loader.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack style-loader and css-loader not working on a ...
I am having an issue on a simple project, after configuring webpack.config.js const HTMLPlugin = require('html-webpack-plugin') const ...
Read more >
postcss-loader | webpack - JS.ORG
In the following configuration the plugin postcss-preset-env is used, which is not installed by default. file.js import css from "file.css";. webpack.config ...
Read more >
postcss-loader
npm install --save-dev postcss-loader postcss ... module.exports = { ... We recommend do not specify from , to and map options, because this ......
Read more >
Migrating from v2 to v3
fs, node.path, ...) process is not defined. GraphQL: character escape sequences in regex filter; GraphQL: __typename field is no ...
Read more >
How to use Webpack with React: an in-depth tutorial
This is where Babel looks at that file. Second Rule. We test for CSS files with a .css extension. Here we use two...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found