We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@pigment-css/vite-plugin
pigment
vite.config.ts
npm run build
https://stackblitz.com/edit/remix-run-remix-aroqz5
Vite performs a CJS build for some reason:
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
Vite should perform an ESM build as type="module" is set in package.json and the file extension is vite.config.ts
type="module"
package.json
Removing the pigment plugin causes Vite to performs a ESM build again:
pigment({ theme: extendTheme(), transformLibraries: ['@mui/material'], })
npx @mui/envinfo
System: OS: Linux 5.0 undefined Binaries: Node: 18.20.3 - /usr/local/bin/node npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm Browsers: Chrome: Not Found npmPackages: @emotion/react: 11.13.0 @emotion/styled: 11.13.0 @mui/core-downloads-tracker: 6.1.0 @mui/material: 6.1.0 => 6.1.0 @mui/material-pigment-css: 6.1.0 => 6.1.0 @mui/private-theming: 6.1.0 @mui/styled-engine: 6.1.0 @mui/system: 6.1.0 => 6.1.0 @mui/types: 7.2.16 @mui/utils: 6.1.0 @pigment-css/react: 0.0.22 @pigment-css/vite-plugin: ^0.0.22 => 0.0.22 @types/react: ^18.2.20 => 18.3.3 react: ^18.2.0 => 18.3.1 react-dom: ^18.2.0 => 18.3.1 typescript: ^5.1.6 => 5.5.3
Search keywords: vite, cjs, performance, remix
The text was updated successfully, but these errors were encountered:
Pigment CSS depends on some of the @mui/* packages internally. We'll be moving away from that which would automatically fix this.
@mui/*
Sorry, something went wrong.
Is this issue a duplicate of #67?
Duplicate of #67
siriwatknp
No branches or pull requests
Steps to reproduce
@pigment-css/vite-plugin
package inside your Remix project.pigment
plugin tovite.config.ts
with a basic config.npm run build
and check the output.https://stackblitz.com/edit/remix-run-remix-aroqz5
Current behavior
Vite performs a CJS build for some reason:
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
Expected behavior
Vite should perform an ESM build as
type="module"
is set inpackage.json
and the file extension isvite.config.ts
Context
Removing the
pigment
plugin causes Vite to performs a ESM build again:Your environment
npx @mui/envinfo
Search keywords: vite, cjs, performance, remix
The text was updated successfully, but these errors were encountered: