Repository: vikejs/vike

Issue #820: Test Build vite
Created: 2023-04-25T12:54:43Z
Description
run command
vite build && cross-env NODE_ENV=production ts-node ./server/index.ts
"ts-node": {
    "transpileOnly": true,
    "esm": true,
    "compilerOptions": {
      "moduleResolution": "Node16"
    }
  },
Error Message + Error Stack
Error: [vite-plugin-ssr@0.4.117][Bug] You stumbled upon a bug in vite-plugin-ssr's source code. Go to https://github.com/brillout/vite-plugin-ssr/issues/new and copy-paste this error. (The error's stack trace is usually enough to fix the problem). A maintainer will fix the bug (usually under 24 hours). Don't hesitate to reach out as it makes vite-plugin-ssr more robust. Debug info (this is for the vite-plugin-ssr maintainers; you can ignore this): virtual:vite-plugin-ssr:importPageCode:client:/pages/dashboard
    at getManifestEntry (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js:34:28)
    at /Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js:25:73
    at Array.forEach (<anonymous>)
    at retrieveAssetsProd (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js:11:24)
    at getPageAssets (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets.js:26:65)
    at Object.__getPageAssets (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/loadPageFilesServer.js:38:76)
    at getHtmlTags (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js:17:42)
    at injectHtmlTagsToString (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/html/injectAssets.js:9:58)
    at renderDocumentHtml (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/html/renderHtml.js:35:80)
    at async executeOnRenderHtmlHook (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/executeOnRenderHtmlHook.js:116:24)
    at async renderPageContext (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/renderPageContext.js:60:30)
    at async renderPageAttempt (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage.js:163:36)
    at async renderPage (/Users/enri/Code/urql/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage.js:41:35)
    at async file:///Users/enri/Code/urql/server/index.ts:152:25
  const [Widget, setWidget] = useState(() => Loading)
  useEffect(() => {
    setWidget(() => lazy(() => import('@/partials/dashboard/widgets/user/UsersAnalytics')))
  }, [])

  return (
    <Suspense fallback={<Loading />}>
      <Widget {...props} />
    </Suspense>
  )

Duplicate issue #826: [vite-plugin-ssr@0.4.117][Bug]
Created: 2023-04-26T21:45:02Z
Description
The error shows when I tried to combine the server folder from :https://github.com/brillout/vite-plugin-ssr/tree/main/examples/base-url-server-v1/server to this project https://github.com/brillout/vite-plugin-ssr/tree/main/examples/vue-router-v1.
The error shows when open the browser.  No errors when bundling or start the server.
Error Message + Error Stack
[1] Error: [vite-plugin-ssr@0.4.117][Bug] You stumbled upon a bug in vite-plugin-ssr's source code. Go to https://github.com/brillout/vite-plugin-ssr/issues/new and copy-paste this error. (The error's stack trace is usually enough to fix the problem). A maintainer will fix the bug (usually under 24 hours). Don't hesitate to reach out as it makes vite-plugin-ssr more robust. Debug info (this is for the vite-plugin-ssr maintainers; you can ignore this): virtual:vite-plugin-ssr:importPageCode:client:/pages
[1]     at getManifestEntry (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js:34:28)
[1]     at /Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js:25:73
[1]     at Array.forEach (<anonymous>)
[1]     at retrieveAssetsProd (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js:11:24)
[1]     at getPageAssets (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/getPageAssets.js:26:65)
[1]     at Object.__getPageAssets (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/loadPageFilesServer.js:38:76)
[1]     at getHtmlTags (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js:17:42)
[1]     at injectHtmlTagsToString (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/html/injectAssets.js:9:58)
[1]     at renderDocumentHtml (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/html/renderHtml.js:35:80)
[1]     at async executeOnRenderHtmlHook (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/executeOnRenderHtmlHook.js:116:24)
[1]     at async renderPageContext (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage/renderPageContext.js:60:30)
[1]     at async renderPageAttempt (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage.js:163:36)
[1]     at async renderPage (/Users/royal/www/vite-ssr-ssl/base-url-server-v1/node_modules/vite-plugin-ssr/dist/cjs/node/runtime/renderPage.js:41:35)
[1]     at async file:///Users/royal/www/vite-ssr-ssl/base-url-server-v1/server/ssr.js:12:23

Closing comment (2023-04-27T05:51:31Z): Seems like a duplicate of #820.
This version should solve the issue. Let me know if it doesn't and I'll re-open.
Btw. in case you can convience your employer: https://github.com/sponsors/brillout. Any amount is appreciated :-).