( set: PrecompilePluginOptions, production: boolean )
| 644 | |
| 645 | // with ark.json's, where prune: true would be ignored |
| 646 | export const resolvedOptionsOf = ( |
| 647 | set: PrecompilePluginOptions, |
| 648 | production: boolean |
| 649 | ): PrecompilePluginOptions => { |
| 650 | refuseArktypeDependencies(set, "Turbopack") |
| 651 | return resolvePrecompileOptions( |
| 652 | withEnvironment( |
| 653 | // Next loads a route's modules at its first request, none written as one |
| 654 | production ? { defers: "large", ...set } : set, |
| 655 | { production, testing: false } |
| 656 | ) |
| 657 | ) |
| 658 | } |
| 659 | |
| 660 | export const readsWith = (opts: PrecompilePluginOptions): boolean => |
| 661 | opts.prune !== false && opts.runtime !== "arktype" && !opts.shadow |
no test coverage detected