Skip to content

Make it possible to use local fuels build #834

@arboleya

Description

@arboleya

Currently, on all package.json we have, we export Typescript files:

"exports": {
  ".": "./src/index.ts",
  "./cli": "./src/cli.ts",
  "./runTypegen": "./src/runTypegen.ts"
}

While this enabled a seamless go to definition experience in VSCode, it prohibits using the packages locally.

Let's say I'm building an app.

  • I add my local fuels as a dependency and re-run my app
  • My app requires the package fuels expecting to receive Javascript
  • Due to our configs (json above), it receives Typescript
  • Nothing works now

Goals we're looking for:

  1. Keep go to definition feature working as is
    • Developer workflow continues to be awesome
  2. While exporting compiled version of the package
    • So it can be used anywhere

The solution relies (edit: may rely) on: declarationMap

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions