Vite plugin isn't inserted correctly when config is declared as variable and `satisfies` is used
Environment
Latest source maps or sveltekit wizard. Note version is irrelevant.
Steps to Reproduce
- 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;
-
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: https://github.com/unjs/magicast/pull/82
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 🥀
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 🥀