Skip to content

Commit

Permalink
fix: ensure compatibility with ES and CommonJS module systems for Sta…
Browse files Browse the repository at this point in the history
…toscopeWebpackPlugin
  • Loading branch information
hoo00nn committed Mar 12, 2024
1 parent 450ae46 commit 82fd2a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/webpack-why/index.js
Original file line number Diff line number Diff line change
@@ -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) {
const StatoscopeWebpackPlugin = _StatoscopeWebpackPlugin.default ?? _StatoscopeWebpackPlugin

Check failure on line 5 in packages/webpack-why/index.js

View workflow job for this annotation

GitHub Actions / Node.js Latest Full

`const` declaration outside top-level scope
if (limitConfig.why) {
let shouldOpen = process.env.NODE_ENV !== 'test' && !limitConfig.saveBundle

Expand Down

0 comments on commit 82fd2a1

Please sign in to comment.