-
Notifications
You must be signed in to change notification settings - Fork 918
Getting warnings for export 'default' (imported as 'mod') was not found
#1742
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
Comments
Yup. I can confirm. Having similar problem, reported it here : webpack-contrib/mini-css-extract-plugin#622 and got also redirected to vue-loader by the mini-css-extract developer. |
I have the same issue which I somewhat fixed, I think it is a combined issue between css-loader and mini-css-extract-plugin. My Fix: I moved all of my css to an actual css file instead of declaring it locally or scoped. This removed every warning/error I had which was 150+ errors after the package upgrade. I am still having an issue though I am trying to use vue-multiselect which requires css initialization which doesn't work from the css file so I haven't figured out how to resolve that so hopefully someone posts more information about that. |
That's not a fix. That's a workaround. :) |
For me it works more or less fine without warnings with mini-css-extract 0.12.0, but this is again a temporary workaround and also not the best one. Hope this will get fixed soon. |
I'm having the same issue. Please let us know when you have a resolution. |
I have the same problem. {
loader: MiniCssExtractPlugin.loader,
options: {
esModule: false,
},
} |
Setting 'esModule: false' does not change anything on my side... |
I've done a bit of digging around this. Not 100% sure what the issue is but hopefully this'll help. This is the line it's complaining about vue-loader/lib/loaders/pitcher.js Line 123 in e9e038d
Webpack sees the following as the source of the module:
So mini-css-extract-plugin is extracting the styles and replacing it with an empty export causing it to complain b/c of the import vue-loader is using. |
Still there with rc1 for me. |
In my case, the replacement of imports helped // from
import * as ST from './styles.scss
// to
import ST from './styles.scss and without options: {
esModule: false,
}, |
For me, this error unclearly but rightfully happened when I used a default export on a CSS Module that only had Example: Component.module.css :global .legacy-global-selector {
outine: 1px solid tomato;
} Component.jsx import styles from "./Component.module.css";
export function Component() {
return (
<span className={styles.span}>This selector doesn't exist!</span>
);
} To fix it, I changed Component.jsx to: import "./Component.module.css";
export function Component() {
return (
<span>This selector doesn't exist!</span>
);
} |
I was getting this error with below class syntax:
Solved By this syntax:
|
just remove the loader, it is not needed when working with the plugin |
This worked! Thankyou |
Version
15.9.3
Reproduction link
https://github.com/amir20/dozzle/tree/webpack5
Steps to reproduce
git clone https://github.com/amir20/dozzle/tree/webpack5
yarn
yarn build
What is expected?
No warnings
What is actually happening?
I am getting a lot of warnings that look like
I created this issue at webpack-contrib/mini-css-extract-plugin#625 but suggestion was to do it here instead
The text was updated successfully, but these errors were encountered: