Skip to content

Export complete files instead of having shared ones #85

@nik312123

Description

@nik312123

Feature request

Basically, let us say my project contains the following typescript files:

  • a.ts
  • b.ts
  • c.ts

a.ts and b.ts both depend on c.ts.

If my package.json has this:

"main": "src/a.ts",
"exports": {
    "src/a.ts": "./dist/a.js"
},

It will export one a.js file, which includes the contents of the c.ts compiled to JS.

If my package.json has this:

"main": "src/a.ts",
"exports": {
    "src/a.ts": "./dist/a.js",
    "src/b.ts": "./dist/b.js"
},

It will export the following files:

  • a.js
  • b.js
  • c-[arbitrary-string-of-characters].js

a.js and b.js will both import from c-[arbitrary-string-of-characters].js.

Is there a way to simply export only a.js and b.js with both having the full contents of c.js within them?

Motivations

I came across this when trying to create multiple full exported JS files using pkgroll.

Alternatives

No response

Additional context

No response

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work financially will speed up resolution

  • I'm willing to offer financial support

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions