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

Warning: You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client" #204

Closed
mifi opened this issue Jul 22, 2022 · 2 comments · Fixed by #205
Labels

Comments

@mifi
Copy link

mifi commented Jul 22, 2022

5.0.1

Not sure why it's happening, because looking at the source it seems correct:

import { createRoot } from 'react-dom/client'

however looking at the dist from npm, it seems to be doing it incorrectly, so maybe something went wrong in the build process:

inside node_modules/sweetalert2-react-content/dist/sweetalert2-react-content.es.js:

/** @preserve
  * package: sweetalert2-react-content v5.0.1
  * file: dist/sweetalert2-react-content.es.js
  * homepage: https://github.com/sweetalert2/sweetalert2-react-content#readme
  * license: MIT
  **/

import React from 'react';
import require$$0 from 'react-dom';

var createRoot;

var m = require$$0;
{
  createRoot = m.createRoot;
  m.hydrateRoot;
}
@limonte
Copy link
Member

limonte commented Jul 22, 2022

Thank you @mifi for the detailed investigation, there was indeed an issue in the build config.

@limonte
Copy link
Member

limonte commented Jul 22, 2022

🎉 This issue has been resolved in version 5.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants