Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Remove module tag. Now interpreted as CommonJS#9

Open
schloerke wants to merge 3 commits intonativew:mainfrom
schloerke:patch-2
Open

Remove module tag. Now interpreted as CommonJS#9
schloerke wants to merge 3 commits intonativew:mainfrom
schloerke:patch-2

Conversation

@schloerke
Copy link
Contributor

Changes:


Changes:

  • Use require() / modules.export to import objects and export the default value
  • Remove "type": "module" from package.json to default back to "type": "commonjs"

External Support:

  1. Provide a CJS version of your library
    ...
    If your library only provides a default (unnamed) export, you’re done

Since the plugin is small and only has a default export, then we can convert it to a CJS module. Now both CJS and ES modules can require/import this module.

(Motivation by not being able to import ES modules within ts-node.)

@vip30 vip30 mentioned this pull request Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant