tserkov / vue-scroll-reveal

A Vue directive to wrap @jlmake's excellent ScrollReveal library.
MIT License
163 stars 17 forks source link

__webpack_require__ is not a function #22

Closed kp-phongpt closed 6 years ago

kp-phongpt commented 6 years ago

I got this error when using with project create by vue-cli 3, before i using with vue-cli 2 it's ok __webpack_require__(...) is not a function at eval (vue-scroll-reveal.js?4c95:9) at Object../node_modules/vue-scroll-reveal/dist/vue-scroll-reveal.js (app.js:3418) at __webpack_require__ (app.js:768) at fn (app.js:131) at eval (main.js:15) at Module../src/main.js (app.js:4600) at __webpack_require__ (app.js:768) at fn (app.js:131) at Object.0 (app.js:5081) at __webpack_require__ (app.js:768) at app.js:904 at app.js:907

tserkov commented 6 years ago

I believe I fixed this with 1.0.11, which I just pushed.

The underlying issue was Babel mishandling export default from es6 modules, which is what v4 of ScrollReveal is now. So I had to be explicit in my require to include default.

Please let me know if this didn't fix it for you.

kp-phongpt commented 6 years ago

thank you!, it's working now