Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

ipfs-core-types causes problems when isolateModules flag is set #3494

Closed
Gozala opened this issue Jan 20, 2021 · 2 comments · Fixed by #3495
Closed

ipfs-core-types causes problems when isolateModules flag is set #3494

Gozala opened this issue Jan 20, 2021 · 2 comments · Fixed by #3495
Assignees
Labels
status/ready Ready to be worked

Comments

@Gozala
Copy link
Contributor

Gozala commented Jan 20, 2021

See following issue for the context ipfs/ipfs-webui#1655 (comment)

@Gozala Gozala added the status/ready Ready to be worked label Jan 20, 2021
@Gozala Gozala self-assigned this Jan 20, 2021
@achingbrain
Copy link
Member

In the linked thread you say you've worked around the issue - is this still valid?

@achingbrain
Copy link
Member

Ah, I guess #3495 is the work around?

achingbrain pushed a commit that referenced this issue Jan 22, 2021
Fixes #3494
Fixes #3498

It appears that `react-scripts` swaps `isolateModules` which [causes problems in webui](ipfs/ipfs-webui#1655 (comment)) because according to TS:

> Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.  TS1205

Changes here address that problem as follows:

- `export type {...}` is used as per TS error.
- `isolateModules` flag is set to `true` so that such issues can be caught locally.
- Setting flags seems to have triggered problems in `ipfs-client`, so I had to add some type annotations to fix that.
- Added `references` in `ipfs-client/tsconfig.json`, otherwise it does not pick up changes in the dependencies unless they are manually rebuild.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/ready Ready to be worked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants