svelte-package
does not take into account exports
entry points
#13456
Labels
pkg:svelte-package
Issues related to svelte-package
Describe the bug
I have a
base
package which exportsComponentProps
interface.This package also have a subpath export
./extension
which extendsComponentProps
via module augmentation and interfaces merging.In another package
impl
i use augmentedComponentProps
type to define properties type for thetext-widget.svelte
component.After building the packages the
impl/dist/text-widget.svelte.d.ts
file contains a definition ofTextWidget
with typeany
as props.Expected
TextWidget
must be defined with the correct props type, possibly withimport('base/extension').WidgetProps<string>
type.Reproduction
https://github.com/x0k/svelte-props-type-inlining-issue
Run
npm i && npm run build -ws
to build packagesLogs
System Info
Severity
annoyance
Additional Information
My original project had a slightly different problem:
svelte-package
could correctly identify the type of the props, but was inserting the wrong path to the type defined in the subpath entrypoint.I've been getting this type
instead of
The text was updated successfully, but these errors were encountered: