Amplify Toolbox
    Preparing search index...

    Variable detectFrameworkConst

    detectFramework: (projectDir: string) => string

    Detect the framework by reading the project's own package.json dependencies, devDependencies, and peerDependencies.

    This intentionally does NOT use node_modules resolution (e.g. isPackageExists from local-pkg) because that approach picks up transitive and peer dependencies installed by other packages — leading to false positives (e.g. a Vite SPA being detected as Next.js because another package declares next as a peer dep).

    Type Declaration

      • (projectDir: string): string
      • Parameters

        • projectDir: string

          absolute path to the project root

        Returns string

        the detected framework type