Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: Unexpected token when using withPlausibleProxy #137

Open
gtokman opened this issue Nov 10, 2024 · 0 comments
Open

Comments

@gtokman
Copy link

gtokman commented Nov 10, 2024

When I to proxy with the following config:

const { withPlausibleProxy } = require('next-plausible')

module.exports = withPlausibleProxy()(withBundleAnalyzer(withContentlayer(nextConfig)))

I get the following error:

script.file-downloads.hash.outbound-links.tagged-events.js:1 Uncaught SyntaxError: Unexpected token '<' (at script.file-downloads.hash.outbound-links.tagged-events.js:1:1)

I updated the provider:

  <PlausibleProvider
          domain={domain}
          trackOutboundLinks
          trackFileDownloads
          hash
          taggedEvents
          enabled={domain.indexOf('localhost') !== -1 || undefined}
          trackLocalhost={domain.indexOf('localhost') !== -1}
        />

Unclear if content layer is causing this error or my next version 14.2.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant