-
-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
We are facing this issue (webpack 5):
export default function config(): Configuration {
return {
...,
externals: [
nodeExternals({
modulesDir: path.resolve(__dirname, 'node_modules'),
allowlist: ['@services/shared'],
}),
],
};
}Type 'ExternalsFunctionElement[]' is not assignable to type 'string | RegExp | (ExternalItemObjectKnown & ExternalItemObjectUnknown) | ExternalItem[] | ((data: ExternalItemFunctionData, callback: (err?: Error | undefined, result?: string | ... 3 more ... | undefined) => void) => void) | ((data: ExternalItemFunctionData) => Promise<...>) | undefined'.
Type 'ExternalsFunctionElement[]' is not assignable to type 'ExternalItem[]'.
Type 'ExternalsFunctionElement' is not assignable to type 'ExternalItem'.
Type 'ExternalsFunctionElement' is not assignable to type '(data: ExternalItemFunctionData, callback: (err?: Error | undefined, result?: string | boolean | string[] | { [index: string]: any; } | undefined) => void) => void'.ts(2322)
types.d.ts(1977, 2): The expected type comes from property 'externals' which is declared here on type 'Configuration'
Type Configuration is provided by webpack version ^5.36.2 and webpack-node-externals version ^3.0.0
Any idea ?
ibraah88, RomainGaillardLesEchos, amehat, ludovicmnji, apascal and 8 more
Metadata
Metadata
Assignees
Labels
No labels