-
Notifications
You must be signed in to change notification settings - Fork 135
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
clean-webpack-plugin: options.output.path not defined. Plugin disabled... #194
Comments
I get the same error as @rightaway ... What is the solution to apply, please? |
Finally, that's how it's working fine:
|
Is this when using the If the author of this module could confirm this, that would be awesome. |
Hi @evpaassen ... And how would it be an example of the code refered to "use the |
@PJ-CM this issue is about clean-webpack-plugin not respecting webpack 5 defaults. Your solution is not really a solution to the issue :) |
I think the issue or the question that @rightaway does is about the right configuration of clean-wbpack-plugin for Webpack 5 and how to avoid that mistake. |
No, it's not about correct configuration. It's about clean-webpack-plugin not taking into account default output.path value when it's not explicitly provided. |
@PJ-CM - your solution works because you've explicitly configured @evpaassen - the behavior is consistent with any kind of build. As @smashercosmo mentioned,
|
It is worth mentioning that beginning Webpack 5.20.0+, there is an module.exports = {
//...
output: {
clean: true, // Clean the output directory before emit.
},
}; |
@solimant coool, didn't know that. thx for the tip) |
So, finally, with the |
@PJ-CM - if you're on Webpack 5.20.0+, yes, at least for basic clean-up needs, in my opinion. |
That's the version I'm using ... Thank you @solimant . Nothing better than immediate responses. |
See also #197 |
* 💄 Add missing breakpoint * 🚨 Explicitly add output.path - see johnagan/clean-webpack-plugin#194
* 💄 Add missing breakpoint * 🚨 Explicitly add output.path - see johnagan/clean-webpack-plugin#194
This plugin still has value if using |
Issue description or question
With webpack 5.11.1 and clean-webpack-plugin 3.0.0 I get error
clean-webpack-plugin: options.output.path not defined. Plugin disabled...
whenpath
isn't defined explicitly in the config file. But https://webpack.js.org/configuration/output/#outputpath defines a default path so is this check necessary? It should use the default path if one isn't provided explicitly.The text was updated successfully, but these errors were encountered: