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

Revert "[icons] Only ship ES modules (#26310)" #26656

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jun 8, 2021

Resolves #26310 (comment) until we can fix nextjs integration.

Our test fixtures weren't set up properly and I'm not sure why our usage is working.

@eps1lon eps1lon added bug 🐛 Something doesn't work package: icons Specific to @mui/icons labels Jun 8, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Jun 8, 2021

No bundle size changes (experimental)

Generated by 🚫 dangerJS against 8d1b146

@eps1lon eps1lon merged commit a533d06 into mui:next Jun 9, 2021
@eps1lon eps1lon deleted the fix/revert-es-modules branch June 9, 2021 03:46
@saurabhnemade
Copy link

saurabhnemade commented Jun 9, 2021

I don't think it's just nextjs.

I have a trying to migrate a project to latest material ui with

    "@material-ui/core": "^5.0.0-alpha.36",
    "@material-ui/icons": "^5.0.0-alpha.36",
    "@material-ui/lab": "^5.0.0-alpha.36",
    "@material-ui/styles": "^5.0.0-alpha.35",

and I got following error in jest of create-react-app. It really weird. app is working fine in browser. Not sure if I am missing anything here.

 SyntaxError: Cannot use import statement outside a module

    > 1 | import CloseIcon from '@material-ui/icons/Close';
        | ^
      2 | import IconButton from '@material-ui/core/IconButton';
      3 | import React from 'react';
      4 | import Snackbar from '@material-ui/core/Snackbar';

However codesandbox works with exact same case
https://codesandbox.io/s/zen-sammet-u8hgd?file=/src/App.test.js

@Jack-Works
Copy link
Contributor

This also breaks our webpack 5 build:

ERROR in ../../node_modules/.pnpm/@material-ui+icons@5.0.0-alpha.36_fffc74904f68e3e25877c5237d4b2364/node_modules/@material-ui/icons/utils/createSvgIcon.js 1:0-67
Module not found: Error: Can't resolve '@material-ui/core/utils' in 'C:\Users\Jack\Workspace\Mask\node_modules\.pnpm\@material-ui+icons@5.0.0-alpha.36_fffc74904f68e3e25877c5237d4b2364\node_modules\@material-ui\icons\utils'
Did you mean 'index.js'?
BREAKING CHANGE: The request '@material-ui/core/utils' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../../node_modules/.pnpm/@material-ui+icons@5.0.0-alpha.36_fffc74904f68e3e25877c5237d4b2364/node_modules/@material-ui/icons/PeopleOutlined.js 1:0-53 3:15-28
 @ ./src/extension/options-page/index.tsx 11:0-67 114:31-49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work package: icons Specific to @mui/icons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants