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

Set package.json type to "module" to support Vite v5 #17

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

mattbrictson
Copy link
Owner

Vite v5 has been released. One of the primary changes is that the CJS Node API is deprecated. This means that Vite prefers that the package.json type is set to module. This affects the default behavior of .js files such that they are now assumed to be ES modules.

To support this, Nextgen required the following changes:

  1. Include "type": "module" in the package.json file Nextgen creates for Node-based projects.
  2. Use the .cjs extension for postcss.config.cjs, so that it is loaded correctly.

@mattbrictson mattbrictson added the ✨ Feature Adds a new feature label Nov 16, 2023
@mattbrictson mattbrictson merged commit 1039cfc into main Nov 16, 2023
7 checks passed
@mattbrictson mattbrictson deleted the vite-v5 branch November 16, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant