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

chore: set type to module in package.json #31

Merged
merged 1 commit into from Jan 25, 2022
Merged

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Jan 25, 2022

The type property of package.json may be used by frontend tooling (e.g Webpack, Vite) in determining whether the package's entry point is a conventional CJS or ES module. If no property is specified, the entry point may be treated as a CJS module. As an illustration, here is a warning that Vite shows when you import vaadin-development-mode-detector:

vaadin-development-mode-detector doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

This PR explicitly sets the type property to module to avoid possible misinterpretation.

Related to vaadin/flow#12574

@Artur- Artur- merged commit 53526ab into master Jan 25, 2022
@Artur- Artur- deleted the chore/set-type-to-module branch January 25, 2022 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants