Skip to content

The inspector function in the app router cannot be used #4

Description

@xinyao27

This issue can be traced back to this Issue: vercel/next.js#59457 (comment)

Currently, the lack of __debugSource in the app router makes it impossible to trace the component file path.

You can try adding @babel/plugin-transform-react-jsx-source or @react-dev-inspector/babel-plugin to .babelrc.js or babel.config.js:

// https://nextjs.org/docs/advanced-features/customizing-babel-config
module.exports = {
  presets: [
    'next/babel',
  ],
 
  plugins: [
    '@react-dev-inspector/babel-plugin',
  ],
}

For more information, please refer to: https://react-dev-inspector.zthxxx.me/docs/compiler-plugin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions