-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(css): correctly set manifest source name and emit CSS file #14945
Conversation
/ecosystem-ci run |
This comment was marked as outdated.
This comment was marked as outdated.
I don't think this is a bad change, but we're quite close to the release now to make this change. I also saw the similar issues like #11413 and figured it's better to wait till next major. If we do favour in merging this, I'd be comfortable only releasing stable on next Friday. I'd be bumped that we have to delay but future me will probably appreciate present me making exceptions 😄 |
This comment was marked as outdated.
This comment was marked as outdated.
Nice work here @sapphi-red! I think it is worth trying to merge this in Vite 5 after reviewing why it is breaking SvelteKit. Delaying a few days the release would not only be good for this change, but to give a few more days to maintainers to squash the other reds, so I vote for that exception too @bluwy 🙏🏼 |
The reason why SvelteKit test in vite-plugin-svelte failed was because the CSS chunk entry overrode the JS chunk entry. I wasn't able to add a test for this, because this depends on the order of .svelte-kit\output\server\.vite contentBefore this PR (contains {
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/error.svelte": {
"file": "entries/fallbacks/error.svelte.js",
"imports": [
"_ssr.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/error.svelte"
},
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte": {
"file": "entries/fallbacks/layout.svelte.js",
"imports": [
"_ssr.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte"
},
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/server/index.js": {
"file": "index.js",
"imports": [
"_internal.js",
"_index.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/server/index.js"
},
".svelte-kit/generated/server/internal.js": {
"file": "internal.js",
"imports": [
"_internal.js"
],
"isEntry": true,
"src": ".svelte-kit/generated/server/internal.js"
},
"_index.js": {
"file": "chunks/index.js",
"imports": [
"_ssr.js"
]
},
"_internal.js": {
"file": "chunks/internal.js",
"imports": [
"_ssr.js"
]
},
"_ssr.js": {
"file": "chunks/ssr.js"
},
"src/routes/+page.css": {
"file": "_app/immutable/assets/_page.1A-_w4me.css",
"src": "src/routes/+page.css"
},
"src/routes/+page.js": {
"file": "entries/pages/_page.js",
"isEntry": true,
"src": "src/routes/+page.js"
},
"src/routes/+page.svelte": {
"css": [
"_app/immutable/assets/_page.1A-_w4me.css"
],
"file": "entries/pages/_page.svelte.js",
"imports": [
"_ssr.js",
"_index.js"
],
"isEntry": true,
"src": "src/routes/+page.svelte"
}
} this PR without 1376a34 ( {
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/error.svelte": {
"file": "entries/fallbacks/error.svelte.js",
"imports": [
"_ssr.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/error.svelte"
},
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte": {
"file": "entries/fallbacks/layout.svelte.js",
"imports": [
"_ssr.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte"
},
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/server/index.js": {
"file": "index.js",
"imports": [
"_internal.js",
"_index.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/server/index.js"
},
".svelte-kit/generated/server/internal.js": {
"file": "internal.js",
"imports": [
"_internal.js"
],
"isEntry": true,
"src": ".svelte-kit/generated/server/internal.js"
},
"_index.js": {
"file": "chunks/index.js",
"imports": [
"_ssr.js"
]
},
"_internal.js": {
"file": "chunks/internal.js",
"imports": [
"_ssr.js"
]
},
"_ssr.js": {
"file": "chunks/ssr.js"
},
"src/routes/+page.js": {
"file": "entries/pages/_page.js",
"isEntry": true,
"src": "src/routes/+page.js"
},
"src/routes/+page.svelte": {
"file": "_app/immutable/assets/entries/pages/_page.1A-_w4me.css",
"src": "src/routes/+page.svelte"
}
} with 1376a34 {
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/error.svelte": {
"file": "entries/fallbacks/error.svelte.js",
"imports": [
"_ssr.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/error.svelte"
},
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte": {
"file": "entries/fallbacks/layout.svelte.js",
"imports": [
"_ssr.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte"
},
"../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/server/index.js": {
"file": "index.js",
"imports": [
"_internal.js",
"_index.js"
],
"isEntry": true,
"src": "../../../node_modules/.pnpm/@sveltejs+kit@1.27.3_svelte@4.2.1_vite@5.0.0-beta.17/node_modules/@sveltejs/kit/src/runtime/server/index.js"
},
".svelte-kit/generated/server/internal.js": {
"file": "internal.js",
"imports": [
"_internal.js"
],
"isEntry": true,
"src": ".svelte-kit/generated/server/internal.js"
},
"_index.js": {
"file": "chunks/index.js",
"imports": [
"_ssr.js"
]
},
"_internal.js": {
"file": "chunks/internal.js",
"imports": [
"_ssr.js"
]
},
"_ssr.js": {
"file": "chunks/ssr.js"
},
"src/routes/+page.js": {
"file": "entries/pages/_page.js",
"isEntry": true,
"src": "src/routes/+page.js"
},
"src/routes/+page.svelte": {
"css": [
"_app/immutable/assets/entries/pages/_page.1A-_w4me.css"
],
"file": "entries/pages/_page.svelte.js",
"imports": [
"_ssr.js",
"_index.js"
],
"isEntry": true,
"src": "src/routes/+page.svelte"
}
} |
/ecosystem-ci run |
📝 Ran ecosystem CI on
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation for the v-p-s/SvelteKit fail. I was a bit concerned with the change, but the new manifest output does seem more correct 👍
Description
319e985: just simplifies the logic, it should be equivalent
b16ed8e: separate the process of generating the filename and the process of getting the original filename
c2a750d: generate the filename based on the chunk name
f1b6f67: fixes the test because #11578 changed the original filename incorrectly and the test was relying that fact
close #8057
fixes #12009
fixes #12072
fixes #14943
close #12030
refs #6649
refs #11578
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).