- Issue created by @mortona2k
- πΊπΈUnited States mortona2k Seattle
Create the path from the bundled file name instead of looking it up as another chunk.
@@ -116,7 +116,7 @@ class Manifest { } return array_filter(array_map( - fn($import) => $this->getChunk($import, $prependBaseUri), + fn($import) => $this->getPath($import), $this->manifest[$chunk][$property], )); }
- First commit to issue fork.
- Status changed to Needs review
11 months ago 2:52pm 3 January 2024 - Status changed to Needs work
10 months ago 6:28pm 20 January 2024 - π΅π±Poland wotnak
This is caused by a change in Vite 5. https://vitejs.dev/guide/migration.html#corresponding-css-files-are-not-...
In earlier versions css files were added as separate chunks, in Vite 5 for js entrypoints they are only listed in the js chunk under css key.Manifest generated for a js file that imports css file:
- on Vite 3 and 4
{ "src/main.css": { "file": "assets/main-98fde70f.css", "src": "src/main.css" }, "src/main.js": { "css": [ "assets/main-98fde70f.css" ], "file": "assets/main-690fc99d.js", "isEntry": true, "src": "src/main.js" } }
- on Vite 5
{ "src/main.js": { "css": [ "assets/main-gINCZU8i.css" ], "file": "assets/main-6jBz11gc.js", "isEntry": true, "src": "src/main.js" } }
Since we already support both Vite 3-4 and Vite 5 in other places (manifest location, dev server response codes) we should also ensure support for both versions in this case.
- on Vite 3 and 4
- π«π·France myriam_b
Hello,
Any news for this issue ?
It's ok for me when i update manifest.php like the merge request. Without this patch, Sass file import in my Typescript are not loaded.Thanks,
- π΅π±Poland ntrfrnc
ntrfrnc β changed the visibility of the branch 3390965-getstyles-not-working to hidden.
- π΅π±Poland ntrfrnc
ntrfrnc β changed the visibility of the branch 3390965-do-not-treat-styles-and-assets-as-chunk to hidden.
- π΅π±Poland ntrfrnc
ntrfrnc β changed the visibility of the branch 3390965-getstyles-not-working to active.
- π΅π±Poland ntrfrnc
ntrfrnc β changed the visibility of the branch 3390965-do-not-treat-styles-and-assets-as-chunk to active.
- π¦πΊAustralia darvanen Sydney, Australia
Is this a duplicate of π Styles imported in a chunk not being added to library RTBC or am I missing something here?
- Status changed to Fixed
3 months ago 4:49pm 5 August 2024 - π΅π±Poland wotnak
Fixed in https://www.drupal.org/project/vite/issues/3444001 π Styles imported in a chunk not being added to library RTBC which was released in 1.2.0 β .
Automatically closed - issue fixed for 2 weeks with no activity.