[ESM] Webpack 5 - NodeJs Server #30525
Labels
breaking change
enhancement
This is not a bug, nor a new feature
scope: code-infra
Specific to the core-infra product
Milestone
Current behavior 😯
ESM are not usable in server side, after node 12 esm is enabled and when we want to use esm is imposible since the packages.json does not have type: module or the files are not properly named with .mjs ext.
when using import Accordion from '@mui/material/Accordion';
this throw an error since is getting the index.js in that folder instead the main in package wich is the commonjs file.
Expected behavior 🤔
expected imported either commonjs file correctly or mark the package.json with type: module as per nodes specs.
Steps to reproduce 🕹
Steps:
Context 🔦
Server Side
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: