Skip to content

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 type: bug It doesn't behave as expected. scope: icons Changes related to the 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 force-pushed the fix/revert-es-modules branch from b9944a5 to 8d1b146 Compare June 8, 2021 20:51
@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

scope: icons Changes related to the icons. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants