Replies: 1 comment
-
For anyone else looking for this answer, I've put this in my next.config.js and it seems to work:
If there's a better way to do this, I'd love to hear about it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone successfully implemented one of the two different versions of Swiperjs in Next 9.3?
I'm a bit new to nextjs(and webpack in general), and am not able to get the next.config.js set up correctly to add the necessary babel-loader for swiper.
I see that nextjs provides a way to extend and customize webpack here:
https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config
And swiper requires this change in your webpack.config.js like this:
All my attempts seem to break the application. I get the error,
[ event ] build page: /next/dist/pages/_error
Hopefully, someone in the community has accomplished this and can point me in the right direction in terms of modifying next.config.js appropriately.
Beta Was this translation helpful? Give feedback.
All reactions