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

Doens't work when using SolidStart #27

Open
erdinhrmwn opened this issue Mar 3, 2025 · 4 comments
Open

Doens't work when using SolidStart #27

erdinhrmwn opened this issue Mar 3, 2025 · 4 comments

Comments

@erdinhrmwn
Copy link

I followed the tutorial as per the docs, but I still get an error: “$effect is not defined”.

@lxsmnsyc
Copy link
Owner

lxsmnsyc commented Mar 3, 2025

Please provide your current setup so I can look further.

@erdinhrmwn
Copy link
Author

app.config.ts

import { defineConfig } from "@solidjs/start/config";
import solidLabels from "vite-plugin-solid-labels";

export default defineConfig({
    ssr: false,
    server: {
        minify: true,
        static: true,
        preset: "static",
        prerender: {
            crawlLinks: true,
        },
    },
    vite: {
        plugins: [
            solidLabels({
                dev: true,
                filter: {
                    include: "src/**/*.{ts,js,tsx,jsx}",
                    exclude: "node_modules/**/*.{ts,js,tsx,jsx}",
                },
            }),
        ],
    },
});

src/global.d.ts

/// <reference types="@solidjs/start/env" />
/// <reference types="solid-labels" />

@erdinhrmwn erdinhrmwn changed the title Doens't work using when using SolidStart Doens't work when using SolidStart Mar 4, 2025
@erdinhrmwn
Copy link
Author

Update: The issue only manifests in routes/index.tsx. When attempting to utilize it within components or store files, it functions correctly.

@lxsmnsyc
Copy link
Owner

lxsmnsyc commented Mar 4, 2025

hmmm I think I recall this specific issue not just in this plugin.

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