raf
raf
Explore posts from servers
SSolidJS
Created by raf on 8/30/2024 in #support
Cannot build SSG
So i'm trying to build SSG instead of SPA so it works better with SEO, however during prerendering, it always return this error
SyntaxError: The requested module 'file://C:/Users/RAFLYMAULANA/Documents/Github/@takodotid/v2-frontend/node_modules/.pnpm/[email protected]/node_modules/solid-js/web/dist/server.js' does not provide an export
SyntaxError: The requested module 'file://C:/Users/RAFLYMAULANA/Documents/Github/@takodotid/v2-frontend/node_modules/.pnpm/[email protected]/node_modules/solid-js/web/dist/server.js' does not provide an export
during building everything fine, if i compile to SPA everything is working fine too, however when trying to build SSG, it just fail, if the result output index.html, it just empty <div id="#app"></div> with no content my app.config.ts
export default defineConfig({
vite: {
resolve: {
alias: {
"@": resolve(dirname(fileURLToPath(import.meta.url)), "src"),
"@assets": resolve(dirname(fileURLToPath(import.meta.url)), "assets"),
},
},
},
server: {
static: true,
prerender: {
routes: ["/", "/about"],
},
},
});
export default defineConfig({
vite: {
resolve: {
alias: {
"@": resolve(dirname(fileURLToPath(import.meta.url)), "src"),
"@assets": resolve(dirname(fileURLToPath(import.meta.url)), "assets"),
},
},
},
server: {
static: true,
prerender: {
routes: ["/", "/about"],
},
},
});
5 replies