Vite does not load proper build (server) on ssr webworker build
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript, vite
- Domain
- build-system
Research direction
Reproduce the SSR webworker build with the provided Vite configuration, first checking how the plugin passes ssr.target and resolve.conditions into dependency resolution. Compare the output with and without the shown aliases; done when the server builds select the correct Solid builds without manual aliases.
Written by the indexing model from the issue text.
Description
While building the ssr bundle with ssr.target = "webworker", it looks like the default web builds of vite is being bundled. I have these in my vite config but it is no help.
resolve: {
conditions: ["worker", "webworker"],
},
Only when I add aliases to correct builds, then it works:
resolve: {
conditions: ["worker", "webworker"],
alias: {
"solid-js/web": "solid-js/web/dist/server",
"solid-js": "solid-js/dist/server",
},
},
Here's my complete config:
Details
{
appType: "custom",
resolve: {
conditions: ["worker", "webworker"],
alias: {
"solid-js/web": "solid-js/web/dist/server",
"solid-js": "solid-js/dist/server",
},
},
build: {
outDir: "dist",
manifest: false,
chunkSizeWarningLimit: 1024 * 1024,
emptyOutDir: false,
ssrEmitAssets: false,
copyPublicDir: false,
assetsDir: ".worker",
rollupOptions: {
input: "virtual:worker-entry",
output: {
entryFileNames: "_worker.js",
inlineDynamicImports: false,
},
},
ssr: true,
},
ssr: {
target: "webworker",
noExternal: true,
},
};
- Dominant language
- TypeScript
- Stars
- 520
- Forks
- 70
- Avg merge
- 23h 35m
- Merged PRs (30d)
- 39
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from solidjs/solid-vite-plugin
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
solidjs/solid-vite-plugin#205 · 1 comment · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
solidjs/solid-vite-plugin#369 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
solidjs/solid-vite-plugin#328 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
solidjs/solid-vite-plugin#308 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
solidjs/solid-vite-plugin#262 · 2 comments ·
All issues in solidjs/solid-vite-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·