-
Notifications
You must be signed in to change notification settings - Fork 68
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
Do you support Nextjs and SWC? #171
Comments
It supports Next.js with SWC. Configs like your But I haven’t tested server-side components yet. Currently, I think it wrong with supporting server-side components due to Next.js don't eject jsx-source for server-side components for hydrate. |
Ok, so I tried adding /** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config, { dev }) {
config.mode = 'development';
config.devtool = 'source-map'; // nextjs automatically converts this to eval-source-map
return config;
},
reactStrictMode: true,
swcMinify: false,
productionBrowserSourceMaps: true,
experimental: {
forceSwcTransforms: true,
},
};
module.exports = nextConfig; It didn't work. I also don't see |
So I've set There are very few client side component in this project, and in addition, when I inspect a client side component I only get the line of the component function like the following: 24 export default function NavLinks() {
25 const pathname = usePathname();
26
27 return (
28 <>
29 {links.map((link) => {
30 const LinkIcon = link.icon;
31 return (
|
it this support |
Hey zthxxx!
First, thank you for the fantastic tool! It has been incredibly useful in my projects.
I'm currently working on a Next.js project that uses SWC for compiling - https://github.com/vercel/next-learn/tree/main/dashboard/final-example, and I've been trying to get react-dev-inspector to work with it. The extension works well with most frameworks, but I'm facing issues when trying to use it with Next.js, especially with server-side components.
I don't want to use babel like in your example in https://github.com/zthxxx/react-dev-inspector/tree/dev/examples/nextjs-custom-server because SWC is much faster but I also afraid that nextjs won't support babel for much longer.
I tried many things to make it work, like configuring next.config.js and .swcrc but nothing worked. Nothing seems to make nextjs + SWC to expose _debugInfo that your extension needs.
.swcrc:
next.config.js:
tnx
The text was updated successfully, but these errors were encountered: