3

I have the following nex.config.js configuration

const withImages = require("next-images");
module.exports = withImages({
  fileExtensions: ["jpg", "jpeg", "png", "gif"],
  assetPrefix: "https://cdn.mydomain.co.za",
  webpack(config) {
    return config;
  },
});

I am trying to pull my images from my cdn instead of locally. The problem with this is that this plugin also tries to pull javascript and css from _next/static/chunks

and therefore my website breaks because files like this one below dont exist on my cdn https://cdn.mydomain.co.za/_next/static/chunks/main.js?ts=1605264866650

Is there a way to specify in the config that I only want to pull images from my CDN and not all assets?

Ayabonga Qwabi
  • 306
  • 5
  • 12

0 Answers0