@common-fp/unplugin-transform-import
v0.1.0
Published
An unplugin transforming named to subpath imports
Readme
Unplugin - Transform Import - Beta
This is an unplugin which transforms named imports to subpath exports.
e.g.
// from
import { mapValues } from 'common-fp'
// to
import mapValues from 'common-fp/map-values'Note
This isn't meant for public use yet. I'm publishing it for personal use since gitpkg is down.
Why did I make this package?
Barrel files are convenient to use but hard on bundlers. By transforming imports, we can write convenient code while telling bundlers to skip the barrel.
I couldn't find a generic solution to this problem besides babel-plugin-import, and I don't want devs to have to pull in babel for this. Therefore, I plan on supporting this transform for major bundlers.
