2 ms·
Cool, that looks like it could work for client-side code that gets run through webpack, but what about for a node-friendly library?
by danenania 8y ago
Cool, that looks like it could work for client-side code that gets run through webpack, but what about for a node-friendly library?
- frankpf 8y agoI use tsconfig's `paths` in combination with the `require-rewrite` npm module (https://github.com/IUnknown68/require-rewrite https://github.com/IUnknown68/require-rewrite). Here's an example: // tsconfig.json ... "paths": { "#src/*": ["src/*"], } ... // package.json ... "requireRewrite": { "map": [ [ "#src/", "dist/src/" ], ] } ... // src/path1/x.ts import { X } from '#src/path2/y.ts`