Skip to content

v7.2.0 assetsDir is not been applied to all files #13071

@fernandojbf

Description

@fernandojbf

I'm using React Router as a...

framework

Reproduction

https://stackblitz.com/edit/github-hjbd1hqq?file=vite.config.ts

Using new version v7.2.0, using assetsDir options in vite.config.ts is not applied to all files.
This was working in previous versions

System Info

System:
    OS: macOS 14.7.3
    CPU: (12) arm64 Apple M2 Pro
    Memory: 101.28 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    Yarn: 4.6.0 - ~/.nvm/versions/node/v20.16.0/bin/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
    bun: 1.2.2 - ~/.bun/bin/bun
    Watchman: 2024.11.11.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 133.0.6943.100
    Chrome Canary: 135.0.7025.0
    Safari: 18.1.1

Used Package Manager

yarn

Expected Behavior

all assets should be saved in the assetsDir folder and use that pathname

Actual Behavior

Some assets (i believe entry files) are been added to a asset folder. Other assets are been added to the correct place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions