Skip to content

Commit

Permalink
Fix ESM type import in Webpack loader
Browse files Browse the repository at this point in the history
Closes GH-2452.

Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
remcohaszing committed Mar 6, 2024
1 parent 8f754f7 commit 3a794ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/loader/index.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* @typedef {import('webpack').LoaderContext<unknown>} LoaderContext
* @typedef {import('./lib/index.js', {with: {'resolution-mode': 'import'}}).Options} Options
*/

// @ts-expect-error: TS complains about CJS importing ESM but it works.
/** @typedef {import('./lib/index.js').Options} Options */

'use strict'

// Note: we can’t export immediately, as TS generates broken types.
Expand Down

0 comments on commit 3a794ab

Please sign in to comment.