Fix module import path for package
Closed this issue · 2 comments
jeremydw commented
Currently, the packaged import path includes the "src" directory, for example:
import {PluginComponent} from '@amagaki/amagaki/src/plugins';
We need to change our release process so that the "src" directory is removed:
import {PluginComponent} from '@amagaki/amagaki/plugins';
Zoramite commented
This has to do with how the TS compiler happens. I believe that you need to point it at the compiled JS, not the TS for importing from another library.
ex: src/index.ts
compiles to dist/src/index.js
which when used as a library becomes import {something} from @amagaki/amagaki/dist/src/index
.
If you figure out a way to do this without co-mingling the compiled js at the root directory let me know :)
jeremydw commented
More details on this here:
#3 (comment)