Git Product home page Git Product logo

Comments (4)

sodatea avatar sodatea commented on June 12, 2024

Root cause:
<CodeSnippet> uses use-resize-observer/polyfilled (version 6) which depends on resize-observer-polyfill: https://unpkg.com/browse/[email protected]/polyfilled.js
which returns the global ResizeObserver constructor when it's available: https://github.com/que-etc/resize-observer-polyfill/blob/4a148452494a155656e4d04b9732b5914896b2e0/src/index.js#L4
As it's a UMD module, it's transformed by @rollup/plugin-commonjs on building, which would add a getAugmentedNamespace() wrapper (https://github.com/rollup/plugins/blob/master/packages/commonjs/src/helpers.js#L37), which doesn't handle the new case.

Could be easily fixed in Rollup.

from vite-plugin-react.

sodatea avatar sodatea commented on June 12, 2024

Fixed in @rollup/plugin-commonjs v23.0.3, which is included in vite v4.0.0-alpha.6.

from vite-plugin-react.

vctqs1 avatar vctqs1 commented on June 12, 2024

Fixed in @rollup/plugin-commonjs v23.0.3, which is included in vite v4.0.0-alpha.6.

i'm using vite@v3, do we have an update in v3?

from vite-plugin-react.

sodatea avatar sodatea commented on June 12, 2024

Vite 4 contains very few breaking changes, so I recommend upgrading to it if possible.

If not, you can open a PR in the Vite repository to backport the dependency upgrade to the v3 branch.

from vite-plugin-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.