Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xinyao27 opened this issue Jan 1, 2024 · 0 comments
Open

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

xinyao27 opened this issue Jan 1, 2024 · 0 comments

Comments

@xinyao27
Copy link
Owner

xinyao27 commented Jan 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant