Skip to content

Commit

Permalink
Fix ensure compatibility with ES and CommonJS module systems for Stat…
Browse files Browse the repository at this point in the history
…oscopeWebpackPlugin (#358)

* fix: ensure compatibility with ES and CommonJS module systems for StatoscopeWebpackPlugin

* fix lint rule error

---------

Co-authored-by: hoo00nn <hoo00nn@github.com>
  • Loading branch information
hoo00nn and hoo00nn committed Mar 13, 2024
1 parent 986857c commit 4ffac80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/webpack-why/index.js
@@ -1,7 +1,8 @@
import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'
import _StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'
import { join } from 'node:path'

function addStatoscope(limitConfig, check, webpackConfig) {
let StatoscopeWebpackPlugin = _StatoscopeWebpackPlugin.default ? _StatoscopeWebpackPlugin.default : _StatoscopeWebpackPlugin;
if (limitConfig.why) {
let shouldOpen = process.env.NODE_ENV !== 'test' && !limitConfig.saveBundle

Expand Down

0 comments on commit 4ffac80

Please sign in to comment.