css-loader namedExport seems to break import-ability of exported classes
wegry opened this issue · 4 comments
wegry commented
- Operating System: macOS 10.14
- Node Version: 12.16.1
- NPM Version: yarn@2.2.2
- webpack Version: 5.0.0-beta.29
- css-loader Version: 4.3.0
Expected Behavior
Importing from a css-module with the config
{
test: /\.css$/,
use: [
"style-loader",
{
loader: "css-loader",
options: {
esModule: true,
modules: {
namedExport: true,
},
},
},
],
}
should result in locals exported being available when imported with import * as s from './index.module.css
.
Actual Behavior
console.log(s)
with the wildcard import above results in an empty object.
https://github.com/wegry/namedExport-and-css-loader/blob/master/webpack.config.js
additional code
https://github.com/wegry/namedExport-and-css-loader/blob/master/index.js
How Do We Reproduce?
Clone/download https://github.com/wegry/namedExport-and-css-loader/ and open the index.html.
alexander-akait commented
Still not implemented in style-loader
info-bit commented
Do you have planned this implementation anytime soon?
alexander-akait commented
@info-bit Yes, this week
alexander-akait commented
Sorry for delay, a lot of work with webpack@5 😞 WIP