Giter VIP home page Giter VIP logo

Comments (7)

afram avatar afram commented on July 20, 2024 1

Great thanks all.

I have added a deprecation notice and will remove this section of the README in due time.

Closing this issue now, please feel free to open if needed :-)

from react-masonry-component.

hburrows avatar hburrows commented on July 20, 2024

Maybe this was necessary with older versions of masonry and imagesloaded ??

from react-masonry-component.

afram avatar afram commented on July 20, 2024

Hi @hburrows

Which version of Webpack are you using?

At the time of writing the Readme, the import order Webpack used was AMD then commonjs. This meant that some dependencies didn't play nice (imagesloaded plus others)

Things may have changed though, so thanks for bringing this up :-)

from react-masonry-component.

hburrows avatar hburrows commented on July 20, 2024

@afram Thanks for the followup. I'm currently using Webpack version 1.13.2 (which is the most recent in the 1.X line).

from react-masonry-component.

afram avatar afram commented on July 20, 2024

Hmm, I wouldn't have thought they would not change such a critical implementation detail without a major version bump, so I'd be very surprised if the import order has changed in that version. I'll check my setup when I have a second and report back.

from react-masonry-component.

yoadsn avatar yoadsn commented on July 20, 2024

I also installed the npm package without any changes to my webpack configuration (I don't use the import-loader).
It works for me, I cannot find any noticeable problems.

I did look into all the top level packages used by this component and all seem to support webpack officially. Probably that is what changed.

The only thing which could still behave weird is this package's conditional "require" statements which depend on the "isBrowser" boolean. I am not sure how webpack will handle that but I assume it would still require them which would mean they are eventually bundled in all the builds (server side and client side if you do both).

I am using that in SSR scenario and all seems to work as said before.

from react-masonry-component.

fk avatar fk commented on July 20, 2024

👍 I can confirm that things work fine without imports-loader for masonry-layout 4.x.
Hunting down the original issue and trying to find a reason for why things work now, I stumbled across this comment by the Masonry author:

Masonry v4.0 and fizzy-ui-utils v2.0.1 has a fix for this issue, using the same package names for AMD and CommonJS dependencies.

from react-masonry-component.

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.