rsnext/packages/next/build/webpack/loaders
Shu Ding 2332272ae1
Do not attach CSS checksum for production build (#43827)
The flight CSS dev loader only does one thing: adding a checksum string to the module exports to make sure the content hash updates during development (so we can trigger HMR properly). This loader is not needed for production builds.

This PR makes sure that the checksum isn't attached and shipped to the client:

<img width="1226" alt="CleanShot 2022-12-07 at 20 49 30@2x" src="https://user-images.githubusercontent.com/3676859/206281754-5f00dfbc-d065-40a7-931f-431a6e9cb34a.png">

Which is 0.25kB for that testing page.

## 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-12-07 20:28:10 +00: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 @next/font fallback fonts order fix (#43633) 2022-12-02 22:09:38 -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 Do not attach CSS checksum for production build (#43827) 2022-12-07 20:28:10 +00: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