๐ BUG: Refactoring `astro.config.mjs` file name is wrong
openscript opened this issue ยท 1 comments
openscript commented
Describe the Bug
When I refactor astro.config.mjs
to astro.config.ts
the imports are updated and become invalid.
After the plugin is done with refactoring the native file name change refactoring is chiming in:
This will break the imports (missing '
):
Steps to Reproduce
- Clone https://github.com/openscript/astro-i18n-demo/tree/repro/refactor-astro-config-file-name
- Open VSCode with Astro Extension
2.11.0
- Refactor
astro.config.mjs
toastro.config.ts
Version: 1.91.0
Commit: ea1445cc7016315d0f5728f8e8b12a45dc0a7286
Date: 2024-07-01T18:52:41.959Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.9.7-arch1-1
Princesseuh commented
The first refactor looks correct to me, .ts
files are to be imported with .js
extensions. Doing both renames at the same time will kinda never work, as they cannot know that it already happened or not, but perhaps there's a way to untangle it so that both extensions don't try to do it.
(The "native renaming" as you put it isn't native, it's TypeScript and our TS plugin doing it)