Closed alvarlagerlof closed 2 years ago
Hi @alvarlagerlof, can you share how you're using PlausibleProvider
and next.config.js
if you use the proxy?
I do this:
const { withPlausibleProxy } = require("next-plausible");
const nextConfig = withPlausibleProxy({
reactStrictMode: true,
swcMinify: true,
experimental: { images: { allowFutureImage: true } },
});
module.exports = nextConfig;
I do this:
const { withPlausibleProxy } = require("next-plausible"); const nextConfig = withPlausibleProxy({ reactStrictMode: true, swcMinify: true, experimental: { images: { allowFutureImage: true } }, }); module.exports = nextConfig;
Hey @alvarlagerlof, you're passing the next config as parameter to withPlausibleProxy
. That function receives its own configuration, and returns a function in which you can pass the next configuration. So you should call it like this:
const { withPlausibleProxy } = require("next-plausible");
const nextConfig = withPlausibleProxy()({
reactStrictMode: true,
swcMinify: true,
experimental: { images: { allowFutureImage: true } },
});
module.exports = nextConfig;
Can you notice the difference? Please let me know if it works.
Thanks!
Ah, thank you. I will try this.
I'll close this for now. Let me know if you still have issues.
- The root value has an unexpected property, 0, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOpt
I get this when I build.