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

New setting cjsInterop #1512

Open
brillout opened this issue Feb 22, 2024 · 0 comments
Open

New setting cjsInterop #1512

brillout opened this issue Feb 22, 2024 · 0 comments
Labels
enhancement ✨ New feature or request

Comments

@brillout
Copy link
Member

brillout commented Feb 22, 2024

Description

// vike.config.js

export default {
  fixNpmPackages: ['some-npm-package']
}

Vike would then:

TODO: Vite currently fails when adding a CJS package to ssr.noExternal, check whether Vite has plans to support executing CJS server-side code.

Edit: a new config cjsInterop would probably be better. Setting it to true would automatically apply it (by dynamically checking whether a package is CJS).

@brillout brillout added the enhancement ✨ New feature or request label Feb 22, 2024
@brillout brillout changed the title New setting fixNpmPackages New setting cjsInterop Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant