Skip to content

Set type: module in package.json#18720

Closed
dbaynard wants to merge 1 commit into
FortAwesome:6.xfrom
dbaynard:esm
Closed

Set type: module in package.json#18720
dbaynard wants to merge 1 commit into
FortAwesome:6.xfrom
dbaynard:esm

Conversation

@dbaynard

Copy link
Copy Markdown

Fixes #18514

I’ve tested (for free-solig-svg-icons) with sveltekit, building with the static adaptor — this change fixes the compile time error, in node.
I’ve also tested with the auto adapter — this fixes the runtime (node) error.

Sadly my understanding of the javascript ecosystem is limited; I don’t know what consequences this change might have. According to Modules: Packages | Node.js v17.5.0 Documentation, though, the additional field is recommended.

Node documentation recommends package authors explicitly set
`"type": "module"`. Without this, sveltekit (and possibly other tooling)
incorrectly treats the ES modules as CommonJS.
@dbaynard

Copy link
Copy Markdown
Author

Feel free to close, in favour of #19041

@tagliala tagliala closed this Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants