Repository: webpack/webpack
File: lib/dependencies/ImportParserPlugin.js (JavaScript)

Code before:
				}
			}

			if (
				mode !== "lazy" &&
				mode !== "lazy-once" &&
				mode !== "eager" &&
				mode !== "weak"
			) {
				parser.state.module.addWarning(
					new UnsupportedFeatureWarning(
						`\`webpackMode\` expected 'lazy', 'lazy-once', 'eager' or 'weak', but received: ${mode}.`,
						/** @type {DependencyLocation} */ (expr.loc)
					)
				);
				mode = "lazy";
			}

			const referencedPropertiesInDestructuring =
				parser.destructuringAssignmentPropertiesFor(expr);
			const state = getState(parser);
			const referencedPropertiesInMember = state.get(expr);
			if (referencedPropertiesInDestructuring || referencedPropertiesInMember) {
				if (exports) {
					const warning = new WebpackError(
						"You don't need `webpackExports` if the usage of dynamic import is statically analyse-able. You can safely remove the `webpackExports` magic comment."
					);
					warning.hideStack = true;
					warning.loc = /** @type {DependencyLocation} */ (expr.loc);
					parser.state.module.addWarning(warning);
				}

				if (referencedPropertiesInDestructuring) {
					exports = exportsFromEnumerable(
						[...referencedPropertiesInDestructuring].map(({ id }) => id)
					);
				} else if (referencedPropertiesInMember) {
					exports = referencedPropertiesInMember;
				}
			}

			if (param.isString()) {
				const attributes = getImportAttributes(expr);

				if (mode === "eager") {
					const dep = new ImportEagerDependency(
						/** @type {string} */ (param.string),
						/** @type {Range} */ (expr.range),
						exports,
						attributes
					);

Review comment (suggestion):
Do you think we really need it, yeah it can be useful in some cases, but maybe it will be too spammy

/cc @hai-x @xiaoxiaojx 

Code after:
			}

			if (
				mode !== "lazy" &&
				mode !== "lazy-once" &&
				mode !== "eager" &&
				mode !== "weak"
			) {
				parser.state.module.addWarning(
					new UnsupportedFeatureWarning(
						`\`webpackMode\` expected 'lazy', 'lazy-once', 'eager' or 'weak', but received: ${mode}.`,
						/** @type {DependencyLocation} */ (expr.loc)
					)
				);
				mode = "lazy";
			}

			const referencedPropertiesInDestructuring =
				parser.destructuringAssignmentPropertiesFor(expr);
			const state = getState(parser);
			const referencedPropertiesInMember = state.get(expr);
			if (referencedPropertiesInDestructuring || referencedPropertiesInMember) {
				if (exports) {
					parser.state.module.addWarning(
						new UnsupportedFeatureWarning(
							"You don't need `webpackExports` if the usage of dynamic import is statically analyse-able. You can safely remove the `webpackExports` magic comment.",
							/** @type {DependencyLocation} */ (expr.loc)
						)
					);
				}

				if (referencedPropertiesInDestructuring) {
					exports = exportsFromEnumerable(
						[...referencedPropertiesInDestructuring].map(({ id }) => id)
					);
				} else if (referencedPropertiesInMember) {
					exports = referencedPropertiesInMember;
				}
			}

			if (param.isString()) {
				const attributes = getImportAttributes(expr);

				if (mode === "eager") {
					const dep = new ImportEagerDependency(
						/** @type {string} */ (param.string),
						/** @type {Range} */ (expr.range),
						exports,
						attributes
					);
					parser.state.current.addDependency(dep);