rsnext/packages/next/next-server/server
Joe Haddad 99a4ea6e9a
feat(next/image): remove sharp for wasm variant (#22253)
This pull request removes the native `sharp` dependency (which doesn't work on some Linux variants, nor **M1 Mac**) and replaces it with a wasm equivalent.

It also reduces Next.js' installed size by 27.3 MB.

The code is adapted from the [Squoosh CLI](https://github.com/GoogleChromeLabs/squoosh).

This PR still supports:

- Rotation normalization
- Resizing
- PNG
- JPEG
- Webp

However, it (temporarily) removes support for:
- Resizing Gifs
- Resizing Tiff

(these formats still get served and rendered correctly by the image component)

---

Fixes #20456
Closes #20738
Closes #21762
2021-02-18 10:23:24 +00:00
..
lib feat(next/image): remove sharp for wasm variant (#22253) 2021-02-18 10:23:24 +00:00
api-utils.ts Allow undefined body sent to sendData() (#20981) 2021-01-26 10:24:48 -05:00
config.ts Update stats flag default (#21791) 2021-02-02 21:38:50 +00:00
crypto-utils.ts chore(next-server): api-utils,crypto-utils,next-server missing types (#13431) 2020-05-27 15:43:10 +00:00
denormalize-page-path.ts Add initial handling for dynamic route href resolving and rewrites on the client (#15231) 2020-08-13 14:39:36 +02:00
font-utils.ts Font optimizations (#14746) 2020-07-28 12:19:28 +02:00
get-page-files.ts Modify low priority files in manifest (#16181) 2020-08-14 04:30:25 +00:00
get-route-from-entrypoint.ts Fix app-document-import-order test for webpack 5 (#15224) 2020-07-17 10:38:06 +02:00
image-config.ts Fallback to default config to enable testing Image component (#19107) 2020-11-12 19:24:08 +00:00
image-optimizer.ts feat(next/image): remove sharp for wasm variant (#22253) 2021-02-18 10:23:24 +00:00
incremental-cache.ts Ensure prerender-manifest contains all i18n revalidate values (#21404) 2021-01-27 11:24:00 +00:00
load-components.ts Allow pages to be async modules to enable top-level-await (#17590) 2020-10-14 11:55:42 +02:00
next-server.ts Only create locale domain links if on locale domain (#22032) 2021-02-11 10:18:24 +00:00
node-polyfill-fetch.js ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
normalize-page-path.ts Add initial handling for dynamic route href resolving and rewrites on the client (#15231) 2020-08-13 14:39:36 +02:00
optimize-amp.ts Add nccing AMP optimizer (#21980) 2021-02-11 09:55:56 +00:00
render.tsx Only create locale domain links if on locale domain (#22032) 2021-02-11 10:18:24 +00:00
require.ts Remove tslint disables (#16116) 2020-08-12 14:39:07 +00:00
router.ts Ensure trailingSlash redirect applies correctly for i18n (#19859) 2020-12-07 17:36:46 +00:00
send-payload.ts Enable handling for revalidate and notFound (#19165) 2020-11-14 07:12:47 +00:00
serve-static.ts Add support for Image Optimizer (#17749) 2020-10-16 13:10:01 +02:00
utils.ts Improve Server Lib Utilities (#12119) 2020-04-23 09:38:57 +02:00