-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.19.0
-
None
-
None
-
False
-
Description of problem:
Let's say a Console dynamic plugin imports some TypeScript types from a PatternFly package:
import type { ThSortType } from '@patternfly/react-table/dist/esm/components/Table/base/types';
This will trigger the following warning when building the plugin with webpack:
LOG from @openshift-console/dynamic-plugin-sdk-webpack/lib/webpack/loaders/dynamic-module-import-loader ../node_modules/ts-loader/index.js??ruleSet[1].rules[0].use[0]!./components/Nav.tsx <w> Non-index and non-dynamic module import @patternfly/react-table/dist/esm/components/Table/base/types
Since this import is type-only, it has no impact on generated module federation code and dynamic-module-import-loader should not report the above warning.
Steps to Reproduce:
1. Add the type-only import as show above to dynamic plugin code.
2. Run plugin webpack build.
Actual results:
Build warning issued for the above type-only import.
Expected results:
No build warning for the above type-only import.