Closed peterhirn closed 1 month ago
I have no problem building with vinxi 0.4.3 and consola 3.2.3
Thanks for the info. I just reproduced this again as described in my initial comment.
After that I reproduced it in a docker container to ensure this is not caused by some local state (ie. pnpm-store).
docker run -it --rm --entrypoint sh node:22.10.0-alpine
corepack enable
pnpm create solid@latest
...
All packages are up-to-date
{
"name": "example-basic",
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"version": "vinxi version"
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.10",
"@solidjs/start": "^1.0.9",
"consola": "^3.2.3",
"solid-js": "^1.9.2",
"vinxi": "^0.4.3"
},
"engines": {
"node": ">=18"
},
"packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
}
Oh yeah, if you import from import { consola } from "consola/basic";
it breaks.
I had imported from import { consola } from "consola";
BUT ...
Adding the alias to the server config solved it:
// app.config.ts
export default defineConfig({
server: {
alias: {
consola: 'consola',
},
},
});
https://stackblitz.com/edit/github-vefktf?file=src%2Fentry-server.tsx,app.config.ts
src/entry-server.tsx
pnpm build