Giter Site home page Giter Site logo

Comments (7)

stutrek avatar stutrek commented on September 26, 2024 2

Thanks @RussMax783 and @zacanger, the new version is pure babel and I took your minimal breaking case and added it to the repo as a simple test.

You can make scroll containers now too, so you'll have to import { Watch } from 'scrollmonitor-react'. Version bump to 2.0 too, since it's a breaking change.

Thanks again for your help.

from scrollmonitor-react.

zacanger avatar zacanger commented on September 26, 2024 1

Minimal example: https://github.com/zacanger/scrollmonitor-react-issue-2

from scrollmonitor-react.

stutrek avatar stutrek commented on September 26, 2024

Are you working on something small that I could clone and try out?

What version of Node are you on?

from scrollmonitor-react.

RussMax783 avatar RussMax783 commented on September 26, 2024

Node: v6.7.0

unfortunately its a pretty large project that i cant do that... But here is what i've found...

I copied your index.js file and put it into my own component and it worked. So im pretty sure it has something to do with your build.

putting "main": "dist/index.js" in your package.json will point to make sure everyone is using the build you have in dist.

Like i said above, when i am able to run dist/index.js i get scrollMonitor is not defined, and looking at index.js line 175, scrollMonitor is not defined anywhere. Maybe because you're marking scrollmonitor as an external? in webpack.config.js

from scrollmonitor-react.

zacanger avatar zacanger commented on September 26, 2024

Removing the externals obj and running webpack builds as expected. Not sure what the intention is with those options, but unless I misunderstand externals, I think that would only work if React, ReactDOM, and scrollMonitor were exposed on window?

from scrollmonitor-react.

stutrek avatar stutrek commented on September 26, 2024

That's it. The externals lets webpack build it without including the files, but that's not the solution I should have used.

from scrollmonitor-react.

zacanger avatar zacanger commented on September 26, 2024

Thanks very much!

from scrollmonitor-react.

Related Issues (14)

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.