Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with css-loader 6 + esmodules + namedExport: true #65

Open
AprilArcus opened this issue Oct 1, 2021 · 4 comments · May be fixed by #66 or #93
Open

Does not work with css-loader 6 + esmodules + namedExport: true #65

AprilArcus opened this issue Oct 1, 2021 · 4 comments · May be fixed by #66 or #93

Comments

@AprilArcus
Copy link

AprilArcus commented Oct 1, 2021

When chained after css-loader 6.x with options.esModule: true (the default), and options.modules.namedExport: true (not the default), typings-for-css-modules-loader dies on this line, since it does not find exports.locals in the emitted source:

// let's only check `exports.locals` for keys to avoid getting keys from the sourcemap when it's enabled
// if we cannot find locals, then the module only contains global styles
const indexOfLocals = content.indexOf(".locals");

@AprilArcus AprilArcus changed the title Does not work with css-loader 6 + esmodules Does not work with css-loader 6 + esmodules + namedExport: true Oct 1, 2021
@AprilArcus AprilArcus linked a pull request Oct 4, 2021 that will close this issue
@nyngwang
Copy link

@AprilArcus Are you still using this plugin? Just asking.

@AprilArcus
Copy link
Author

Nope

@nyngwang
Copy link

nyngwang commented Mar 1, 2024

@AprilArcus Then what's the alternative you're using?

@AprilArcus
Copy link
Author

I'm no longer attached to the product team which used this plugin, so my advice is hypothetical.

Consider adopting https://www.npmjs.com/package/typed-scss-modules as a pre-build stage, or using it as the basis for a novel loader for webpack or your favorite modern bundler or meta-framework.

@jdelStrother jdelStrother linked a pull request Apr 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants