@monolithmtl/locomotive-scroll
v1.3.35
Published
```js // gatsby-node.js
Readme
SSR & SSG
// gatsby-node.js
exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
if (stage === 'build-html' || stage === 'develop-html') {
actions.setWebpackConfig({
module: {
rules: [
{
test: /locomotive-scroll/,
use: loaders.null(),
},
],
},
})
}
}Use Scroll Events
The instance can be defined without any parameters in order to call event anywhere.
const scroll = new LocomotiveScroll()
scroll.on('call', (func) => {
// Event
})