Skip to content

Commit

Permalink
Force loading CommonJS version of esquery (fixes #601)
Browse files Browse the repository at this point in the history
  • Loading branch information
fkling committed Aug 21, 2021
1 parent 93d778e commit a477e48
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ module.exports = Object.assign({
],
use: 'null-loader',
},
// Without this rule weback is loading the ESM version of esquery, which
// causes an error since eslint uses `require('esquery')` (not
// `require('esquery').default`) to load the module.
{
issuer: /eslint4/,
resolve: {
alias: {
'esquery': 'esquery/dist/esquery.min.js',
},
},
},
{
test: [
/\/CLIEngine/,
Expand Down

0 comments on commit a477e48

Please sign in to comment.