Closed JanRuettinger closed 12 months ago
How are you running the app? If you're trying locally with next dev
, you need to manually add the enabled={true}
prop to PlausibleProvider
. By default it is only enabled in production mode.
That was it thank you! Now the proxy feature doesn't work.
const withTM = require('next-transpile-modules')(['echarts', 'zrender']);
const { withPlausibleProxy } = require('next-plausible');
const nextConfig = {
reactStrictMode: true,
eslint: {
dirs: ['src'],
},
};
module.exports = withPlausibleProxy(withTM(nextConfig));
That's my updated next.config.js
Again the script is not loaded when deployed on Vercel but works perfectly fine on localhost (also the proxy feature).
You're using withPlausibleProxy
wrong... it receives its config as first parameter and then returns a function in which you can pass your nextjs config. So you should use it like this:
module.exports = withPlausibleProxy()(withTM(nextConfig));
Let me know if that works.
Seems fixed by the latest answer.
Hi,
the script.js file is not loaded for me with the following setup.
next.config.js
_app.ts
When I include the script tag manually in the header plausible works fine.
Any ideas what might cause this?