Issue 1:
Bug report

webpack.config.js

{ target: 'es5' }

build result

1. __webpack_require__.a(module, async (__webpack_handle_async_dependencies__) => {}
2. var wrapDeps = function(deps) { return deps.map(function(dep) {
if(dep !== null && typeof dep === "object") {
if(dep[webpackThen]) return dep;
if(dep.then) {
var queue = [], result;
dep.then(function(r) {
obj[webpackExports] = r;
completeQueue(queue);
queue = 0;
});
var obj = { [webpackThen]: (fn, reject) => { queueFunction(queue, fn); dep.catch(reject); } };
return obj;
}
}
return { [webpackThen]: (fn) => { completeFunction(fn); }, [webpackExports]: dep };
}); };

files at:

webpack/lib/dependencies/HarmonyCompatibilityDependency.js

webpack/lib/runtime/AsyncModuleRuntimeModule.js

why not run supportsArrowFunction()?

runtimeTemplate.supportsArrowFunction()

Can traditional functions cause other errors ？

new InitFragment(
`${RuntimeGlobals.asyncModule}(${module.moduleArgument}, **async (__webpack_handle_async_dependencies__) => {\n`**,
InitFragment.STAGE_ASYNC_BOUNDARY,
0,
undefined,
module.buildMeta.async
? `\n__webpack_handle_async_dependencies__();\n}, 1);`
: "\n});"
)

`var wrapDeps = ${runtimeTemplate.returningFunction(
`deps.map(${runtimeTemplate.basicFunction("dep", [
'if(dep !== null && typeof dep === "object") {',
Template.indent([
"if(dep[webpackThen]) return dep;",
"if(dep.then) {",
Template.indent([
"var queue = [], result;",
`dep.then(${runtimeTemplate.basicFunction("r", [
"obj[webpackExports] = r;",
"completeQueue(queue);",
"queue = 0;"
])});`,
"**var obj = { [webpackThen]: (fn, reject) => { queueFunction(queue, fn); dep.catch(reject); } };**",
"return obj;"
]),
"}"
]),
"}",
"**return { [webpackThen]: (fn) => { completeFunction(fn); }, [webpackExports]: dep };**"
])})`,
"deps"
)};`,

Other relevant information:

webpack version: 5.25.0

Node.js version: 12

Operating System: mac

Additional tools:

english is poor, sry

Issue 2:
Bug report

What is the current behavior?

Not sure if this is a problem with a loader or webpack itself, but on a project that is using typescript, I'm getting a warning:

WARNING in ./React/src/components/_shared/form/form-model.ts
17:0-39 "export 'IValidation' was not found in '_types/IValidation'"
at HarmonyExportImportedSpecifierDependency._getErrors (C:\project\node_modules\webpack\lib\dependencies\HarmonyExportImportedSpecifierDependency.js:352:11)
at HarmonyExportImportedSpecifierDependency.getWarnings (C:\project\node_modules\webpack\lib\dependencies\HarmonyExportImportedSpecifierDependency.js:299:15)
at Compilation.reportDependencyErrorsAndWarnings (C:\project\node_modules\webpack\lib\Compilation.js:985:24)
at Compilation.finish (C:\project\node_modules\webpack\lib\Compilation.js:817:9)
at hooks.make.callAsync.err (C:\project\node_modules\webpack\lib\Compiler.js:479:17)
at _done (eval at create (C:\project\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:9:1)
at _err0 (eval at create (C:\project\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:20:22)
at _addModuleChain (C:\project\node_modules\webpack\lib\Compilation.js:758:12)
at processModuleDependencies.err (C:\project\node_modules\webpack\lib\Compilation.js:697:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

However, the file in question _types/IValidation, is imported in numerous other files without any warnings being emitted related to those other files that are also importing IValidation from _types/IValidation.

The contents of the file are simple, and there is an "export interface IValidation" in the file:

export enum ValidationType {
Required,
Min,
Max,
MinLength,
MaxLength,
}

export interface IValidation {
validationType: ValidationType;
errorMessage?: string;
minValue?: number;
maxValue?: number;
maxLength?: number;
minLength?: number;
}

We do have our "src" directory set as a module resolution root in the resolve section of our webpack config, but I also tried importing the file with a relative path and still get the warning.

I am kind of wondering if this is related to typescript. We are using ts-loader, but we have it doing type checking only and are doing transpiling with babel.

If the current behavior is a bug, please provide the steps to reproduce.

Not sure since I get the warning due to the import of the file in question in one file but not due to several other files that also import the same interface from the same file.

What is the expected behavior?

It should not issue a warning about a missing export if the export clearly exists.

Other relevant information:

webpack version: 4.8.3

Node.js version: 8.9.1

Operating System: Windows 10

Additional tools: webpack-cli 2.1.3