rsnext/packages/next/build/webpack/loaders
Hannes Bornö 5788f602a4
Improve @next/font error handling (#43298)
Use `WellKnownErrorsPlugin` when formatting `@next/font` errors.

The error handling is different for expected errors (like validation
errors) and unknown ones. If the error is expected it just displays the
formatted error message. If it's an unknown error it will also display
the stacktrace, and in case the versions of `@next/font` and `next` are
different it will encourage you to try to update them both.

Removes the usage of `error-loader` when importing from
`pages/_document.js`, handle that case with `WellKnownErrorsPlugin` as
well.

The current warning when using different versions is removed. If the
versions are incompatible you'll get an error in the overlay instead.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-11-23 16:08:28 -08:00
..
css-loader Add support for font loaders (#40746) 2022-09-21 22:12:59 -07:00
next-edge-ssr-loader Alias next public api to esm on edge runtime (#42709) 2022-11-09 19:20:32 -08:00
next-flight-loader remove legacy transform code (#40966) 2022-09-27 22:03:49 +00:00
next-font-loader Improve @next/font error handling (#43298) 2022-11-23 16:08:28 -08:00
next-serverless-loader Add missing matcher support (#42660) 2022-11-08 16:48:27 -08:00
next-style-loader Update loader-utils (#30743) 2021-11-02 16:13:15 +01:00
postcss-loader Lazy-load postcss (#31762) 2021-11-25 18:41:20 +01:00
resolve-url-loader Move resolve-url-loader into Next.js (#32932) 2022-01-02 16:16:17 -06:00
error-loader.ts Remove webpack4 types (#39631) 2022-08-16 09:55:37 +00:00
get-module-build-info.ts Client directive (#40415) 2022-09-18 00:00:16 +00:00
next-app-loader.ts Use import to load page and layout (#42325) 2022-11-10 02:16:59 +00:00
next-client-pages-loader.ts Client directive (#40415) 2022-09-18 00:00:16 +00:00
next-edge-function-loader.ts Remove edge shared deps (#41413) 2022-10-14 06:08:48 -07:00
next-flight-client-entry-loader.ts App dir sass (#41690) 2022-10-23 19:05:55 -07:00
next-flight-css-dev-loader.ts App dir sass (#41690) 2022-10-23 19:05:55 -07:00
next-image-loader.js Imageloader: collect images serverside to include images from staticp… (#41554) 2022-11-23 09:28:53 -05:00
next-middleware-asset-loader.ts [edge] allow importing blob assets (#38492) 2022-07-19 12:27:15 -05:00
next-middleware-loader.ts Remove edge shared deps (#41413) 2022-10-14 06:08:48 -07:00
next-middleware-wasm-loader.ts Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
next-swc-loader.js Refactor app dir related flags (#41166) 2022-10-04 22:16:44 +00:00
noop-loader.ts Remove webpack4 types (#39631) 2022-08-16 09:55:37 +00:00
utils.ts App dir sass (#41690) 2022-10-23 19:05:55 -07:00