Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate .d.ts files into cjs #1101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Duplicate .d.ts files into cjs #1101

wants to merge 1 commit into from

Conversation

jacogr
Copy link
Member

@jacogr jacogr commented Aug 25, 2023

Generates output such as -

...
    "./config/typedoc": "./config/typedoc.cjs",
    "./detectOther": {
      "module": {
        "types": "./detectOther.d.ts",
        "default": "./detectOther.js"
      },
      "require": {
        "types": "./cjs/detectOther.d.ts",
        "default": "./cjs/detectOther.js"
      },
      "default": {
        "types": "./detectOther.d.ts",
        "default": "./detectOther.js"
      }
    },
    "./package.json": {
      "require": "./cjs/package.json",
      "default": "./package.json"
    },
...

May address polkadot-js/api#5711 (or at worst not make it worse)

@jacogr jacogr added the WIP Work in Progress label Aug 25, 2023
@rflechtner
Copy link

From my experiments with patching up polkadot dependencies in the node_modules, I am confident that this would indeed address the issue.
May I ask if we could move this along? Node16 / NodeNext is currently the recommended module setting for most use cases and applications, even when emitting CommonJS module code (https://www.typescriptlang.org/docs/handbook/modules/guides/choosing-compiler-options.html), a combination which is still not useable if any of the polkadot-js dependencies are being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in Progress
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants