Skip to content

Commit 3a794ab

Browse files
authored
Fix ESM type import in Webpack loader
Closes GH-2452. Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent 8f754f7 commit 3a794ab

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/loader/index.cjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
22
* @typedef {import('webpack').LoaderContext<unknown>} LoaderContext
3+
* @typedef {import('./lib/index.js', {with: {'resolution-mode': 'import'}}).Options} Options
34
*/
45

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

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy