io-ts icon indicating copy to clipboard operation
io-ts copied to clipboard

import best practices

Open Lonli-Lokli opened this issue 2 years ago • 1 comments

What is the current way for tree shakable imports? Will import * as t from 'io-ts' still be tree shakable with webpack 5?

Lonli-Lokli avatar Apr 30 '22 21:04 Lonli-Lokli

My understanding is that star imports are fine for tree shaking. In other words, only the exported items you actually use from the star-imported module will be kept and the rest will be removed, as one would hope.

ragnese avatar Jan 04 '23 01:01 ragnese