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

[Bug?]: web/src/auto-imports.d.ts file generated after running yarn rw storybook-vite #10848

Closed
1 task
oliwheeler opened this issue Jun 18, 2024 · 4 comments
Closed
1 task
Assignees
Labels
bug/needs-info More information is needed for reproduction

Comments

@oliwheeler
Copy link

What's not working?

After upgrading to Redwood 7.7.1, running yarn rw storybook-vite generates 3 files:

  1. web/.storybook/main.ts (expected)
  2. web/.storybook/preview-body.html (expected)
  3. web/src/auto-imports.d.ts (unexpected)

1 and 2 are explained here: https://community.redwoodjs.com/t/storybook-in-redwood-is-moving-to-vite/7212.

File contents of web/src/auto-imports.d.ts:

/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
  const mockCurrentUser: typeof import('@redwoodjs/testing/web')['mockCurrentUser']
  const mockGraphQLMutation: typeof import('@redwoodjs/testing/web')['mockGraphQLMutation']
  const mockGraphQLQuery: typeof import('@redwoodjs/testing/web')['mockGraphQLQuery']
}

Should this file just be added to .gitignore or is it a bug that it is generated in the first place?

How do we reproduce the bug?

RedwoodJS 7.7.1

Run yarn rw storybook-vite.

web/src/auto-imports.d.ts is generated.

What's your environment? (If it applies)

No response

Are you interested in working on this?

  • I'm interested in working on this
@oliwheeler oliwheeler added the bug/needs-info More information is needed for reproduction label Jun 18, 2024
@dthyresson
Copy link
Contributor

Hi @oliwheeler and thanks for reporting this issue. I'm checking with the rest of the Core Team to get some more context around storybook in this case.

@dthyresson dthyresson self-assigned this Jun 18, 2024
@arimendelow
Copy link
Contributor

Hi @oliwheeler, leaving this out of the forum post was actually an oversight on my part — because it's something that you'll never need to interact with (unlike the Storybook config files), I didn't think to include it. It's created by this, which is used by the Framework Package here.

I've also updated the forum post to reflect this. Thanks for the callout!

@dthyresson
Copy link
Contributor

@oliwheeler does the community post update help? If so, let me know and I'll close -- or if need more clarification do let me or @arimendelow know. Cheers!

@oliwheeler
Copy link
Author

@dthyresson the updates community post helps! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/needs-info More information is needed for reproduction
Projects
None yet
Development

No branches or pull requests

3 participants