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

Fix ensure compatibility with ES and CommonJS module systems for StatoscopeWebpackPlugin #358

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

hoo00nn
Copy link
Contributor

@hoo00nn hoo00nn commented Mar 12, 2024

  • Fix compatibility issues arising from differences between CommonJS and ES module systems.

@hoo00nn hoo00nn marked this pull request as ready for review March 12, 2024 16:22
import { join } from 'node:path'

function addStatoscope(limitConfig, check, webpackConfig) {
let StatoscopeWebpackPlugin = _StatoscopeWebpackPlugin.default ? _StatoscopeWebpackPlugin.default : _StatoscopeWebpackPlugin;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you find a reason why it works sometime with default sometimes not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't know why it behaves that way. However, in my case, the module operates using the CommonJS format. Due to that error, I have to remove the --why option and configure it manually. What do you think about supporting this?

I've created a test project, and the same issue occurs. How is it in your environment?

@ai ai merged commit 4ffac80 into ai:main Mar 13, 2024
3 checks passed
@ai
Copy link
Owner

ai commented Mar 13, 2024

Thanks. Released in 11.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants