paulpflug / vue-mixins Goto Github PK
View Code? Open in Web Editor NEWA collection of mixins in vue
A collection of mixins in vue
Hi, I'm attempting to use vue-comps/vue-scrollfire
and while it looks like upgrading it to 2.0 might be as easy as changing lifecycle hooks,vue-mixins
is pegged to "vue": "^1.0.26"
.
Any plans to get your awesome mixins and components 2.0 compatible? Thanks
I am getting this exception
Uncaught TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'
which traces back to this line:
observer.observe(document.body, {
attributes: true,
childList: true,
characterData: true,
subtree: true
});
document.body is null because the document is not yet loaded, i am loading my webpack bundle in the head of the page.
The observer should not observe until some it is actually watching some component
I guess it happens, because window
is exposed: https://github.com/paulpflug/vue-mixins/blob/master/src/_throttledListener.coffee#L3
[20:22:54] sobolev :: MacBook-Pro-Nikita ➜ Documents/Frontends/razgrebaem ‹master*› » NODE_ENV=production ./node_modules/.bin/webpack --config build/webpack.server.conf.js --progress --hide-modules && node server
Hash: 736c9b36894982894cba
Version: webpack 1.13.2
Time: 2086ms
Asset Size Chunks Chunk Names
server-bundle.js 46.8 kB 0 [emitted] app
/Users/sobolev/Documents/Frontends/razgrebaem/node_modules/vue-mixins/_throttledListener.js:6
rAF = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
^ReferenceError: window is not defined
at Object. (/Users/sobolev/Documents/Frontends/razgrebaem/node_modules/vue-mixins/_throttledListener.js:6:9)
at Object. (/Users/sobolev/Documents/Frontends/razgrebaem/node_modules/vue-mixins/_throttledListener.js:32:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/Users/sobolev/Documents/Frontends/razgrebaem/node_modules/vue-mixins/onWindowResize.js:15:3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.