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

Vite plugin isn't inserted correctly when config is declared as variable and satisfies is used #445

Open
Lms24 opened this issue Sep 12, 2023 · 2 comments · Fixed by unjs/magicast#82

Comments

@Lms24
Copy link
Member

Lms24 commented Sep 12, 2023

Environment

Latest source maps or sveltekit wizard. Note version is irrelevant.

Steps to Reproduce

  1. Create this config file:
// vite.config.ts
import { somePlugin1, somePlugin2 } from 'some-module'

import type { UserConfig } from 'vite';

const myConfig = defineConfig({
  plugins: [somePlugin1(), somePlugin2()]
}) satisfies UserConfig;

export default myConfig;
  1. npx @sentry/wizard -i sourcemaps

Expected Result

Plugin is inserted

Actual Result

Plugin isn't inserted

Solution

We're (still) using magicast to take care of plugin insertion. I'm contemplating switching to recast entirely but for now I opened a PR in magicast to fix this: unjs/magicast#82

@Lms24 Lms24 changed the title Vite plugin is not inserted correctly when config is declared as variable and satisfies is used Vite plugin isn't inserted correctly when config is declared as variable and satisfies is used Sep 12, 2023
@Lms24 Lms24 self-assigned this Sep 12, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

Copy link

github-actions bot commented Nov 7, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

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

Successfully merging a pull request may close this issue.

1 participant