If .pcss is specified, the src in the manifest.json file will be saved as .css #12009
Closed
7 tasks done
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
It can be obtained by accessing "http://127.0.0.1:5173/app-pcss.pcss" when executing with the
vite
command.The path cannot be resolved because the contents of manifest.json generated by the ```vite build`` command are as follows.
The path differs depending on how Vite is executed, and it cannot be used correctly.
(If you are using Vita with Laravel, the path will be different between development and release, which will cause problems.)
Using .pcss works fine if manifest.json looks like this:
It seems that you can take measures by adding judgment whether lang is pcss or postcss in the processing of line 568 of the css.ts file.
vite/packages/vite/src/node/plugins/css.ts
Line 568 in d953536
Reproduction
https://stackblitz.com/edit/vitejs-vite-vydpzr
Steps to reproduce
Create dist/manifest.json, dist/app-pcss.css and dist/app-scss.css.
Run
yarn build
Dev access.
Run
yarn dev
Access https://vitejsvitevydpzr-bwxk--5173.local-credentialless.webcontainer.io/app-pcss.pcss in the browser pane after running.
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 16.14.2 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 7.17.0 - /usr/local/bin/npm npmPackages: vite: ^4.1.0 => 4.1.1
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: