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
clean up async module loading #17870
Conversation
Failing test suitesCommit: 975e36c test/integration/auto-export-serverless-error/test/index.test.js
Expand output● Auto Export Error Serverless › fails to emit the page
test/integration/404-page-ssg/test/index.test.js
Expand output● 404 Page Support SSG › serverless mode › should build successfully
● 404 Page Support SSG › serverless mode › should respond to 404 correctly
● 404 Page Support SSG › serverless mode › should render error correctly
● 404 Page Support SSG › serverless mode › should not show an error in the logs for 404 SSG
● 404 Page Support SSG › serverless mode › should render index page normal
● 404 Page Support SSG › serverless mode › should not revalidate custom 404 page
test/integration/404-page-custom-error/test/index.test.js
Expand output● Default 404 Page with custom _error › serverless mode › should build successfully
● Default 404 Page with custom _error › serverless mode › should respond to 404 correctly
● Default 404 Page with custom _error › serverless mode › should render error correctly
● Default 404 Page with custom _error › serverless mode › should render index page normal
test/integration/api-support/test/index.test.js
Expand output● API routes › Serverless support › should render page
● API routes › Serverless support › should return 404 for undefined path
● API routes › Serverless support › should not conflict with /api routes
● API routes › Serverless support › should set cors headers when adding cors middleware
● API routes › Serverless support › should work with index api
● API routes › Serverless support › should return custom error
● API routes › Serverless support › should throw Internal Server Error
● API routes › Serverless support › should throw Internal Server Error (async)
● API routes › Serverless support › should parse JSON body
● API routes › Serverless support › should special-case empty JSON body
● API routes › Serverless support › should support boolean for JSON in api page
● API routes › Serverless support › should return error with invalid JSON
● API routes › Serverless support › should return error exceeded body limit
● API routes › Serverless support › should parse bigger body then 1mb
● API routes › Serverless support › should support etag spec
● API routes › Serverless support › should parse urlencoded body
● API routes › Serverless support › should parse body in handler
● API routes › Serverless support › should parse body with config
● API routes › Serverless support › should show friendly error for invalid redirect
● API routes › Serverless support › should show friendly error in case of passing null as first argument redirect
● API routes › Serverless support › should redirect with status code 307
● API routes › Serverless support › should redirect to login
● API routes › Serverless support › should redirect with status code 301
● API routes › Serverless support › should return empty query object
● API routes › Serverless support › should parse query correctly
● API routes › Serverless support › should return empty cookies object
● API routes › Serverless support › should return cookies object
● API routes › Serverless support › should return 200 on POST on pages
● API routes › Serverless support › should return JSON on post on API
● API routes › Serverless support › should return data on dynamic route
● API routes › Serverless support › should work with dynamic params and search string
● API routes › Serverless support › should work with dynamic params and search string like lambda
● API routes › Serverless support › should prioritize a non-dynamic page
● API routes › Serverless support › should return data on dynamic nested route
● API routes › Serverless support › should 404 on optional dynamic api page
● API routes › Serverless support › should return data on dynamic optional nested route
● API routes › Serverless support › should work with child_process correctly
● API routes › Serverless support › should show warning with next export
● API routes › Serverless support › should build api routes
test/integration/custom-page-extension/test/index.test.js
Expand output● Custom page extension › serverless mode › should work with normal page
● Custom page extension › serverless mode › should work dynamic page
test/integration/basepath/test/index.test.js
Expand output● basePath serverless › should add basePath to routes-manifest
● basePath serverless › should prefetch pages correctly when manually called
● basePath serverless › should prefetch pages correctly in viewport with
● basePath serverless › should 404 for public file without basePath
● basePath serverless › should serve public file with basePath correctly
● basePath serverless › should rewrite with basePath by default
● basePath serverless › should not rewrite without basePath without disabling
● basePath serverless › should not rewrite with basePath when set to false
● basePath serverless › should rewrite without basePath when set to false
● basePath serverless › should redirect with basePath by default
● basePath serverless › should not redirect without basePath without disabling
● basePath serverless › should not redirect with basePath when set to false
● basePath serverless › should redirect without basePath when set to false
● basePath serverless › should add header with basePath by default
● basePath serverless › should not add header without basePath without disabling
● basePath serverless › should not add header with basePath when set to false
● basePath serverless › should add header without basePath when set to false
● basePath serverless › should not update URL for a 404
● basePath serverless › should handle 404 urls that start with basePath
● basePath serverless › should navigate back to a non-basepath 404 that starts with basepath
● basePath serverless › should update dynamic params after mount correctly
● basePath serverless › should navigate to index page with getStaticProps
● basePath serverless › should navigate to nested index page with getStaticProps
● basePath serverless › should work with nested folder with same name as basePath
● basePath serverless › should work with normal dynamic page
● basePath serverless › should work with hash links
● basePath serverless › should work with catch-all page
● basePath serverless › should redirect trailing slash correctly
● basePath serverless › should redirect trailing slash on root correctly
● basePath serverless › should navigate an absolute url
● basePath serverless › should navigate an absolute local url with basePath
● basePath serverless › should navigate an absolute local url without basePath
● basePath serverless › should 404 when manually adding basePath with
● basePath serverless › should 404 when manually adding basePath with router.push
● basePath serverless › should 404 when manually adding basePath with router.replace
● basePath serverless › should show the hello page under the /docs prefix
● basePath serverless › should have correct router paths on first load of /
● basePath serverless › should have correct router paths on first load of /hello
● basePath serverless › should fetch data for getStaticProps without reloading
● basePath serverless › should fetch data for getServerSideProps without reloading
● basePath serverless › should have correct href for a link
● basePath serverless › should have correct href for a link to /
● basePath serverless › should show 404 for page not under the /docs prefix
● basePath serverless › should show the other-page page under the /docs prefix
● basePath serverless › should have basePath field on Router
● basePath serverless › should navigate to the page without refresh
● basePath serverless › should use urls with basepath in router events
● basePath serverless › should use urls with basepath in router events for hash changes
● basePath serverless › should use urls with basepath in router events for cancelled routes
● basePath serverless › should use urls with basepath in router events for failed route change
● basePath serverless › should allow URL query strings without refresh
● basePath serverless › should correctly replace state when same asPath but different url
● basePath serverless › should always strip basePath in serverless-loader
● Test suite failed to run
|
nope, going to try this again later |
Realized that with a small refactor, #17590 can be implemented a lot cleaner.
Basically, we should just re-export the whole page and app module promise from the serverless bundle, instead of trying re-exporting the individual exports from those modules as maybe-promises