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

Fix issues importing some plugins in Next SSR #1015

Closed
paulboocock opened this issue Oct 18, 2021 · 0 comments
Closed

Fix issues importing some plugins in Next SSR #1015

paulboocock opened this issue Oct 18, 2021 · 0 comments
Assignees
Labels
type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.

Comments

@paulboocock
Copy link
Contributor

Describe the bug
Some plugins create alias' for global objects, such as navigator or window. This is an issue when importing the plugin in a server environment as those globals don't exist.

To Reproduce

import { GeolocationPlugin } from '@snowplow/browser-plugin-geolocation';

const MyApp = ({ Component, pageProps }) => {
  useSnowplow('sp', 'https://...', { appId: 'test123', plugins: [GeolocationPlugin(true)] });

Expected behavior
import should work fine, outside of useEffect.

@paulboocock paulboocock added the type:defect Bugs or weaknesses. The issue has to contain steps to reproduce. label Oct 18, 2021
@paulboocock paulboocock self-assigned this Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.
Projects
None yet
Development

No branches or pull requests

1 participant