Function next_dynamic

Source
pub fn next_dynamic(
    is_development: bool,
    is_server_compiler: bool,
    is_react_server_layer: bool,
    prefer_esm: bool,
    mode: NextDynamicMode,
    filename: Arc<FileName>,
    pages_or_app_dir: Option<PathBuf>,
) -> impl Pass
Expand description

Creates a SWC visitor to transform next/dynamic calls to have the corresponding loadableGenerated property.

NOTE We do not use NextDynamicMode::Turbopack yet. It isn’t compatible with current loadable manifest, which causes hydration errors.