With an update to sentry-testkit to depend on native node modules
this example no longer works in the browser. Sentry-testkit is made
for a node server not to work in the browser. However, with this
change we no longer require sentry-testkit in our setup for sentry.
Before this change with the update of sentry-testkit to 3.1 we were
encountering errors when trying to run the next.js local development
server because it was trying to load sentry-testkit in the browser.
Thank you to @ohana54 for his example found here https://github.com/wix/sentry-testkit/issues/43
this will now close this issue https://github.com/zeit/next.js/issues/9768
as well.
- Updated dependencies.
- For compatibility with the current next-graphql-react API, added next.config.js using the `withGraphQLConfig` decorator.
- For compatibility with the current graphql-react API, updated the options used with `useGraphQL`.
- Updated the readme to align with the current graphql-react and next-graphql-react APIs.
- Minor destructuring refactor for clarity.
- Converted the custom App to a functional component.
* no ssr component which uses useEffect hook
This library used wasn't updated for 4 years. I tried to contact the owner, which failed, and decided to create my own. So if you see this PR as a shameless plugin for my own component you can delete it. Just wanted to make this example more up to date.
* Update index.js
* fix linting
* Update index.js
* Update example
* Fix redirect logic for unauthenticated flows
* check for lack of existence of window for server code
Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
* remove comment
Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
* remove comment
Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
* Add AMP First example
The sample demonstrates how to build an AMP First Site with AMP. If
follows all the best-practices recommended by Lighthouse and will
result in a fully-qualified PWA.
Live demo of the page: https://my-next-app.sebastianbenz.now.sh/#development=1
* small improvements to AmpScript and AmpState
* remove gitignore
* Update example
* Move styles down in Layout
* Apply lint fix and tweak prop-types
* Add warning for host header usage
As long as node does not ship with fill-icu this will do the trick making FormattedRelativeTime work on nodejs.
Other polyfill like @formatjs/intl-relativetimeformat/polyfill did not work on nodejs and thus giving an error that client did not match server.
* Add initial bit for plugins
* Add checks for needed metadata values
* Add test
* Initial plugins changes
* Add handling for _app middleware
* Add loading of _document middleware and
handling of multiple default export syntaxes
* Fix insert order for middleware member expression
* Remove early return from middleware plugin from testing
* Add tests for current plugin middlewares
* Update test plugin package.json
* Update handling for class default export
* Update to use webpack loader instead of babel
plugin, remove redundant middleware naming, and add field for required env for plugins
* Add middleware to support material-ui use case
and example material-ui plugin
* Update tests and remove tests stuff from google analytics plugin
* Remove old plugin suite
* Add init-server middleware
* Exit hard without stack trace when error in collecting plugins
* Add on-error-client and on-error-server and update
to run init-server with next-start in serverless mode
* Update init-client for google analytics plugin
* Add example Sentry plugin and update with-sentry-simple
* Remove middleware field/folder and use src dir for plugins
* Add post-hydration middleware and update
material-ui plugin
* Put plugins code behind flag
* Update chromedriver
* Revert "Update chromedriver"
This reverts commit 1461e978e677f7da05e29e0415ec614a04bf65f9.
* Update lock file
* Remove un-needed _app for sentry example
* Add auto loading of scoped packages, add plugins
config for manually listing plugins, and update
to only collect plugins once
* Update example plugins
* Expose plugins' config
* Rename plugin lifecycles and add babel-preset-build
* Rename other methods with unstable
* Update log when plugin config overrides auto-detecting
* Fix example active-class-anme: Add support for children of ActiveLink without a className.
* Update examples/active-class-name/components/ActiveLink.js
Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
* add netlifycms example
* Updated everything
* Moved the layout out of _app
* Updated next to latest
* applied prettier and linter
* Removed unrequired files
* Moved to with-netlify-cms
* updated readme to reflect the new name
* Added license field
## Changelog
- Use functional components instead of class components
- Use default exports like in all other examples
- Rename `Portal` component to `ClientOnlyPortal`.
* [with-typescript] Updated TypeScript example to use API routes
Next.js 9.0.0 has been out for a while, which supports API routes, but
the examples were never updated to make use of it. This PR adds a simple
example of an API route which also makes use of dynamic routing.
A simple `fetch()` wrapper is also added for example purposes, and the
pages structure have also been updated to dynamic routing.
* Properly link to the dynamic page
* Update inferno examples to v7.3
* Add polyfill for React.createContext
* Alias react and react-dom with inferno-compat
* Fix linter errors
* Add warning about hooks and suspense support
## Changelog
- Removed react-lazyload
- Removed images
- Removed ReactDOMServer from Client
- Removed next.config.js
## Notes
**CommonJS vs ESM:** In the future we might be able to use top level `await` in order to import only on the server (e.g.: `await import(“react-dom/server”)`)
Until then we need to mix CommonJS and ESM in favor of messing with the webpack config.
The call to `accept.languages()` made the fallback not work.
When called e.g. with `Accept-Language: es-ES,es;q=0.9`, `locale` would contain `[ 'es-ES', 'es' ]` instead of `en`.
(See also: https://www.npmjs.com/package/accepts#languagelanguages )
* quill js with nextjs
* remove spaces and blank line
* fix code lints
* imporve lin
* fix lint error
* trying to fix lint
* Update examples/with-quill-js/README.md
Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
* Update examples/with-quill-js/README.md
Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
* update readme
* Update example
* Add auth0 example
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Remove LICENSE
* Add create next-app section
* Update to latest @auth0/nextjs-auth0
* Update user handling
* Update profile link to use <Link>
* Update .env template to reflect guides
* Simplify example
* Update example to prefer API call (temporary hardcoded url)
* Simplify state and ensure rerenders don’t race
* Clear up import being commented
* Make code style consistent
* Update pages to reflect required auth on the client-side
* Memoize the user on window
* Update now.json instruction
* Remove meta fields
* Update docs with explanation
* Update UI for auth0 example
## Changes
- [x] Remove _app.js usage
- [x] Migrate withRedux HOC to functional component
- [x] Add correct display name
- [x] Remove abstractions/boilerplate from example
- [x] Add useInterval HOC from Dan
* Update to capture server exceptions and more
- Adds test cases for several server and client-side exceptions
- Allows capturing more server-side exceptions by overriding _error.js and using Sentry.captureException() within
- Use @sentry/node on the server
- Rely on Next.js's React Error Boundary instead of creating our own in _app.js
* Update test notes
Found some differences while testing in production
* Remove accidental mount throw on test 8
* Add note about server-side source maps
* Linting fixes
Some users aren't aware they need to edit their custom server to support various HTTP Methods (e.g. POST for API Routes).
Instead, we should just handle all HTTP Methods out-of-the-box.
---
Closes#8237
* Remove connectToDevTools in favour of better default
* Remove redirect code from client
* Simplify function
* Remove apollo-boost
This package is optimized for client usage only.
We actually never used it. We only usered its reexports.
More info:
https://www.apollographql.com/docs/react/v2.5/recipes/authentication/#header
* Remove stopPropagation
We actually don’t need it.
* Refactor getToken method
We want to show how to get the token.
This can be from a cookie or some other isomorph store.
We are not interested in the cookie abstraction in this example.
* Secure cookie
not perfect but better than before….
* Add ssr config option
This was documented but not implemented