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

Using Extract Component to File in Client component in NextJS13 breaks it #188

Open
yafkari opened this issue May 9, 2023 · 0 comments
Open

Comments

@yafkari
Copy link

yafkari commented May 9, 2023

I am working on a project on NextJS 13 and tried to extract a component to a file.
I had a 'use client' at the top of the file but after extracting it, the extension added the import to the extracted component and broke the first line that was supposed to be "use client".

Before:

'use client'

// my imports

After:

import { ExtractedComponent ] from './ExtractedComponent'
;('use client')

// my imports
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