turbo
8fcf5d11 - loaders: use pre-compiled loader-runner distributed with Next.js (#3823)

Comment changes are shownComment changes are hidden
Commit
2 years ago
loaders: use pre-compiled loader-runner distributed with Next.js (#3823) The benefit of this depends on https://github.com/vercel/next.js/pull/45962, but it remains compatible with apps including `loader-runner`. This first attempts to require `loader-runner` from the app's installed version of Next.js, falling back to requiring the package directly. We should probably eventually remove this fallback once all compatible versions of Next.js include the precompiled version, as that has a more predictable version of the package. Test Plan: Linked a local copy of Next.js including https://github.com/vercel/next.js/pull/45962 to an app without `loader-runner` that uses loaders and verified loaders ran.
Author
Parents
  • crates
    • next-core/src
      • File
        next_build.rs
      • next_client
        • File
          context.rs
      • File
        next_config.rs
      • next_server
        • File
          context.rs
    • turbopack-node/js/src/transforms
      • File
        webpack-loaders.ts
    • turbopack/src/module_options
      • File
        mod.rs
      • File
        module_options_context.rs