Skip to content

Doesn't work with astro #23

@wakaztahir

Description

@wakaztahir

error :

Unexpected use of css. Make sure that solid-styled's plugin is setup correctly.

configuration:
I tried this

export default defineConfig({
    integrations: [solidJs(), integratePaths()],
    plugins : [
        solidStyled({
            prefix: 'my-prefix', // optional
            filter: {
                include: 'src/**/*.{ts,js,tsx,jsx}',
                exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',
            },
        }),
    ]
});

also this

function integratePaths() {
    return {
        name: 'anique-solid-vite-config',
        hooks: {
            'astro:config:setup': ({updateConfig}) => {
                updateConfig({
                    vite: {
                        plugins : [
                            solidStyled({
                                prefix: 'my-prefix', // optional
                                filter: {
                                    include: 'src/**/*.{ts,js,tsx,jsx}',
                                    exclude: 'node_modules/**/*.{ts,js,tsx,jsx}',
                                },
                            }),
                        ]
                    },
                });
            },
        },
    };
}
export default defineConfig({
    integrations: [solidJs(), integratePaths()]
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions