Skip to content
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

Solid Blocks do not work with Solid Start (SSR enabled) #16

Open
Haapavuo opened this issue Sep 4, 2023 · 1 comment
Open

Solid Blocks do not work with Solid Start (SSR enabled) #16

Haapavuo opened this issue Sep 4, 2023 · 1 comment

Comments

@Haapavuo
Copy link

Haapavuo commented Sep 4, 2023

Vite gives multiple errors:

 Error when evaluating SSR module /src/routes/index.tsx: failed to import "solid-blocks"
 Error when evaluating SSR module /node_modules/.pnpm/solid-start@0.3.4_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.7.11_solid-start-node@0.3.4_vite@4.4.9/node_modules/solid-start/root/FileRoutes.tsx: failed to import "/src/routes/index.tsx"
 Error when evaluating SSR module /src/root.tsx: failed to import "/node_modules/.pnpm/solid-start@0.3.4_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.7.11_solid-start-node@0.3.4_vite@4.4.9/node_modules/solid-start/root/FileRoutes.tsx"

SyntaxError: Cannot use import statement outside a module

etc.

Any fixes available? Changing / removing excludes, externals or noExternals do not help.

vite.config.ts:

import solid from "solid-start/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    solid({
      ssr: true,
      experimental: {
        islandsRouter: true,
        islands: true
      }
    })],
  optimizeDeps: {
    include: ['mapbox-gl'],
    exclude: ["solid-blocks"]
  },
  ssr: {
    external: ["solid-blocks"]
  }
});
@atk
Copy link
Owner

atk commented Sep 12, 2023

Sorry, I haven't had the time to fix SSR. It's on my list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants