I am trying to use locomotive-scroll and gsap with my Next.js projects but I still have problems with the locomotive part. For example this adapted program works well in React, but not in Next. I commented all the locomotive lines to see at least how the program should look.
I tried adding
const withTM = require("next-transpile-modules")(["locomotive-scroll"]); module.exports = withTM({});
in the next.config.js file but it doesn't work yet.
Any help?, please.
Besides, the scroll bar styles are not been affected by the locomotive styles. I suppose due to the styles names are changed by Next.js.
Thanks in advance.