File tree 1 file changed +5
-8
lines changed
packages/ngtools/webpack/src/ivy
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
9
9
import * as path from 'path' ;
10
+ import type { LoaderContext } from 'webpack' ;
10
11
import { AngularPluginSymbol , FileEmitterCollection } from './symbol' ;
11
12
12
- export function angularWebpackLoader (
13
- this : import ( 'webpack' ) . LoaderContext < unknown > & {
14
- [ AngularPluginSymbol ] ?: FileEmitterCollection ;
15
- } ,
16
- content : string ,
17
- map : string ,
18
- ) {
13
+ export function angularWebpackLoader ( this : LoaderContext < unknown > , content : string , map : string ) {
19
14
const callback = this . async ( ) ;
20
15
if ( ! callback ) {
21
16
throw new Error ( 'Invalid webpack version' ) ;
22
17
}
23
18
24
- const fileEmitter = this [ AngularPluginSymbol ] ;
19
+ const fileEmitter = (
20
+ this as LoaderContext < unknown > & { [ AngularPluginSymbol ] ?: FileEmitterCollection }
21
+ ) [ AngularPluginSymbol ] ;
25
22
if ( ! fileEmitter || typeof fileEmitter !== 'object' ) {
26
23
if ( this . resourcePath . endsWith ( '.js' ) ) {
27
24
// Passthrough for JS files when no plugin is used
You can’t perform that action at this time.
0 commit comments