Skip to content

Commit a397113

Browse files
📚 Add documentation about webpack complains
When using `import` instead of `import type`
1 parent 890257b commit a397113

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ export const lazyInject = fixPropertyDecorator(originalLazyInject);
139139

140140
## Current Pitfalls
141141

142+
- If you are using webpack and it complains about missing exports due to types
143+
not being removed, you can switch from `import { MyType } from ...` to
144+
`import type { MyType } from ...`. See [#46](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/issues/46) for details and
145+
examples.
146+
142147
- We cannot know if type annotations are just types (i.e. `IMyInterface`) or
143148
concrete values (like classes, etc.). In order to resolve this, we emit the
144149
following: `typeof Type === 'undefined' ? Object : Type`. The code has the

0 commit comments

Comments
 (0)