-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
feat: cssp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
Following on from my comment in #7651 - the linked PR (#10741) doesn't solve the issue when main.js and assets are stored in a top level assets directory, e.g.:
├── assets
│ ├── images
│ │ └── vite.svg
│ ├── main.js
│ └── styles
│ ├── pages
│ │ └── home.scss
│ └── style.scss
├── index.html
├── package.json
├── package-lock.json
├── public
│ └── vite.svg
└── README.md
You can see in the linked reproducer that url('../../images/vite.svg') does not resolve the image correctly, even though that is the correct relative path to the file from assets/styles/pages/home.scss. When the path is changed to url('../images/vite.svg') it resolves correctly.
Reproduction
Steps to reproduce
Run npm install followed by npm run dev
System Info
System:
OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11600 @ 2.80GHz
Memory: 6.97 GB / 15.47 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 16.18.1 - /usr/bin/node
Yarn: 1.22.17 - /usr/bin/yarn
npm: 8.19.2 - /usr/bin/npm
Browsers:
Chrome: 107.0.5304.110
Firefox: 107.0Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
tbruckmaier, CallumWatkins, triangles13, roydukkey, dyabol and 39 more
Metadata
Metadata
Assignees
Labels
feat: cssp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)