* Catch-all Route Support
* Add SSR tests
* Add additional test
* Add unit tests
* Put the feature behind a flag
* Apply suggestions from code review
Co-Authored-By: JJ Kasper <jj@jjsweb.site>
* Fix test
* Polyfilling fetch and object-assign
* Polyfilling corejs object-assign
* Adding object-assign in polyfills.js. IE11 does not support Object.assign
* Fixing failing test
* Updating object.assign polyfill to fix aliasing
* Updating test case value to match new build stats
* Increasing the size of default build to 225kb
* Fixing defer-script test case to not include polyfill.js
* Revert README.md
* Re-design the polyfill approach based on PR feedback
* Adding comment and fixing test case
* Rename polyfills chunk
* Extract aliases into helper
* Remove extra new line
* Fix TypeScript typings
* Adding _internal_fetch alias
* Adjust build manifest plugin
* Build manifest plugin changes - adding a separate entry for polyfills
* Rename polyfills entry in build-manifest.json
* Remove old comment
* Fix TS
* Set key
* Polyfills already added
* Filtring polyfill.module.js
* Fix test
* Add __internal_fetch to alias rule
* Adjust name
* bump size
* ignore polyfills
* sigh
* Aliasing Object.assign
* Mergin latest changes
* Integration test for polyfilling fetch
* Remove comment
* Fix prettier error
* Fix review comments
* Fix review comments
* Update fetch.js
* Fix tests
This refactors the `handleSlug` method in preparation for catch-all routing.
This PR is opened separately so the catch-all diff can be reviewed easier.
* 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>
* Initialize Git repo on app creation
This PR initializes a Git repository after Create Next App runs.
We ensure the app was not created in an already-existing Git or Mercurial repo.
Failures of setup (no Git installed) do not fail the application bootstrapping.
Closes#9077 (replaces)
* Add test
* Update index.test.js
* 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
* Test custom-routes serverless
* Make sure we add default statusCode to routes-manifest
* Update routes-manifest
* Add DEFAULT_REDIRECT_STATUS constant
* Convert wrapper class to function component
* Remove unneeded export
* Check versions of chrome and chromedriver
* Update to chromedriver 76
* Revert config.yml
* Update with-router.tsx
* add initial custom-routes handling
* Add tests for custom-routes
* Handle chained redirects, separate dev custom
routes reading, and add version to routes manifest
* Handle no routes manifest
* Swap build custom routes calling
* Add flatten-routes
* Add flattening of custom routes
* Re-work implementation to follow routes top-down
* Add regex field to routes-manifest
* Fix path-to-regexp match breaking after upgrade
* Fix duplicate const from merge
* Add some changes from review
* Don't make path-match strict
* add default custom route values
* Update routes-manifest
* Update options for path-match
* Remove todo
* Add test for rewrite with params
* Only use strict mode for custom routes
* Update dynamic-routing test
* Move getCustomRoutes to prepare
* Remove extra change
* Update handling for error-in-error test
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Apply suggestions from review
* Update slice change
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Apply suggestions from review
* Fix TypeScript error
* Fix getCustomRoutes in dev mode
* Apply suggestions from code review
* Update slice
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Delete un-used test page
* Add test for param overwriting
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Add extra check to param test
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.