Skip to content

Refactoring never works when moving folders, only when moving files #5616

@gustavotoyota

Description

@gustavotoyota

Vue - Official extension or vue-tsc version

3.0.6

VSCode version

1.5.5

Vue version

3.5.19

TypeScript version

5.8.3

System Info

System:
    OS: Linux 5.15 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-13620H
    Memory: 10.94 GB / 15.48 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 22.13.0 - ~/.nvm/versions/node/v22.13.0/bin/node
    npm: 10.9.2 - ~/.nvm/versions/node/v22.13.0/bin/npm
    bun: 1.2.21 - ~/.nvm/versions/node/v22.13.0/bin/bun

package.json dependencies

{
  "name": "@weavio/builder",
  "dependencies": {
    "@ai-sdk/openai": "^2.0.8",
    "@ai-sdk/vue": "^2.0.9",
    "@guolao/vue-monaco-editor": "^1.5.5",
    "@itihon/position-observer": "^1.2.4",
    "@nuxt/eslint": "1.9.0",
    "@nuxt/fonts": "0.11.4",
    "@nuxt/icon": "2.0.0",
    "@nuxt/image": "1.11.0",
    "@nuxtjs/color-mode": "3.5.2",
    "@nuxtjs/i18n": "10.0.6",
    "@nuxtjs/tailwindcss": "6.14.0",
    "@openrouter/ai-sdk-provider": "^1.1.2",
    "@pinia/nuxt": "0.11.2",
    "@sidebase/nuxt-auth": "1.0.1",
    "@syncedstore/core": "^0.6.0",
    "@tailwindcss/vite": "^4.1.12",
    "@tanstack/vue-table": "^8.21.3",
    "@thednp/position-observer": "^1.1.0",
    "@tiptap/extension-collaboration": "^2.22.3",
    "@tiptap/extension-placeholder": "^2.22.3",
    "@tiptap/starter-kit": "^2.22.3",
    "@tiptap/vue-3": "^2.22.3",
    "@unhead/vue": "^2.0.3",
    "@unovis/ts": "^1.6.0",
    "@unovis/vue": "^1.6.0",
    "@vee-validate/zod": "^4.15.1",
    "@vueuse/nuxt": "13.7.0",
    "@weavio/core": "1.0.0",
    "@weavio/mini-scripts-compiling": "1.0.0",
    "@weavio/mini-scripts-handling": "1.0.0",
    "@weavio/misc": "1.0.0",
    "ai": "^5.0.9",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "confbox": "^0.2.2",
    "embla-carousel-vue": "^8.6.0",
    "eslint": "^9.0.0",
    "fast-json-patch": "^3.1.1",
    "jsondiffpatch": "^0.7.3",
    "jsonwebtoken": "^9.0.2",
    "lodash-es": "^4.17.21",
    "lucide-vue-next": "^0.540.0",
    "next-auth": "~4.21.1",
    "nuxt": "^4.0.3",
    "openai": "^5.12.2",
    "pinia": "^3.0.3",
    "position-observer": "^1.0.3",
    "reka-ui": "^2.4.1",
    "sanitize-html": "^2.17.0",
    "shadcn-nuxt": "2.2.0",
    "tailwind-merge": "^3.3.1",
    "tailwindcss": "^4.1.12",
    "tw-animate-css": "^1.3.7",
    "ulid": "^3.0.1",
    "vaul-vue": "^0.4.1",
    "vee-validate": "^4.15.1",
    "vue": "^3.5.18",
    "vue-color": "^3.1.0",
    "vue-router": "^4.5.1",
    "vue-sonner": "^2.0.8",
    "y-monaco": "^0.1.6",
    "y-prosemirror": "^1.3.6",
    "y-websocket": "^2.0.4",
    "zod": "^4.0.17"
  },
  "devDependencies": {
    "@histoire/plugin-nuxt": "^1.0.0-alpha.2",
    "@histoire/plugin-vue": "^1.0.0-alpha.2",
    "@types/jsonwebtoken": "^9.0.10",
    "@types/lodash-es": "^4.17.12",
    "@types/sanitize-html": "^2.16.0",
    "csstype": "^3.1.3",
    "histoire": "^1.0.0-alpha.2",
    "prettier": "^3.5.3",
    "prettier-plugin-tailwindcss": "^0.6.12",
    "tailwind-scrollbar": "^3"
  },
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "postinstall": "nuxt prepare",
    "preview": "nuxt preview",
    "story": "histoire dev"
  },
  "type": "module"
}

Steps to reproduce

Move any folder containing .vue components which are referenced by files outside of that folder.

What is expected?

All imports, either incoming, outgoing, or within the moved folder should update correctly according to the move.

What is actually happening?

No import updates happen either inside or outside of the moved folder.

Link to minimal reproduction

No response

Any additional comments?

I've had this problem basically since the launch of Vue 3. I feel like this used to work correctly when Vue 2 was the latest version.

The same operation works flawlessly with React code. Actually, I never had any problem with refactoring with React in 2 years of using it daily.

If I select a bunch of .vue files and move them to another folder, I receive this popup:
Image
And the import updates work reasonably well. (sometimes they break, though)

But if I select and move a folder instead of files, no popup appears and no refactoring happens.

I mostly use Cursor/VS Code on Windows with WSL, but I tested and the same occurs without WSL. It seems the same happens in Ubuntu as well, but I tested it a while ago. I also tested with a brand new VS Code profile with only the Vue.js extension, still the same problem.

Is it just happening with me? Is there something simple I'm missing?

Edits: added more details

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions