No description
Find a file
Will Binns-Smith 817e089a30 turbopackLoaders: accept basic loader options (vercel/turbo#3540)
Fixes WEB-525

This allows webpack loaders defined by `experimental.turbopackLoaders` in `next.config.js` to pass serializable options to loaders.

It expands `turbopackLoaders` to accept not just loader names for a given extension, but also `{loader: string, options: Object}`. These options are verified to be serializable and passed to `loader-runner` and exposed as `getOptions()` to the loader.

Test Plan: Added an integration test for basic options. Verified the serializable check by passing `class Foo {}; new Foo()` as an option value and verified the error was displayed.
2023-01-31 20:44:00 +00:00
packages/next-swc/crates turbopackLoaders: accept basic loader options (vercel/turbo#3540) 2023-01-31 20:44:00 +00:00