oke
oke
SSolidJS
Created by snorbi on 2/4/2025 in #support
Lots of separate requests when using lucide-solid during devmode
So you should import directly the icons you need. Or use solid-icons
4 replies
SSolidJS
Created by snorbi on 2/4/2025 in #support
Lots of separate requests when using lucide-solid during devmode
This is a problem with Vite and Lucide Icons when you do named imports. This happens in tabler icons too The doc actually has a section that calls this out: to improve Vite dev server performance, import directly from "lucide-solid/icons" folder https://lucide.dev/guide/packages/lucide-solid
4 replies
SSolidJS
Created by seL3cT on 2/4/2025 in #support
Solid routing
When you want a component to appear on every page, you should think of Layout and/or nested routing. You can use a Layout root like this example here to put your Navbar onto every page https://docs.solidjs.com/solid-router/concepts/layouts (i.e. put your Navbar in a Layout component)
11 replies
SSolidJS
Created by seL3cT on 2/4/2025 in #support
Solid routing
That's the error. Your Navbar uses A A should only be used in a Route element
11 replies
SSolidJS
Created by seL3cT on 2/4/2025 in #support
Solid routing
What is in your Navbar ?
11 replies
SSolidJS
Created by andahendriksen on 1/16/2025 in #support
Have anyone gotten ts particles to work in solid?
If you check the example app they have under the apps/solid folder in the repo, this seems like the new recommended approach https://github.com/tsparticles/solid/blob/main/apps/solid/src/App.tsx
import configs from "@tsparticles/configs";
import type { Component } from 'solid-js';
import { createSignal, Show } from "solid-js";
import { loadFull } from "tsparticles";
import Particles, { initParticlesEngine } from "@tsparticles/solid";

const App: Component = () => {
const init = initParticlesEngine(loadFull)
const [config, setConfig] = createSignal(configs.basic)

setTimeout(() => setConfig(configs.absorbers), 1000)

return (
<Show when={init()}>
<Particles id="tsparticles" options={config()}/>
</Show>
);
};

export default App;
import configs from "@tsparticles/configs";
import type { Component } from 'solid-js';
import { createSignal, Show } from "solid-js";
import { loadFull } from "tsparticles";
import Particles, { initParticlesEngine } from "@tsparticles/solid";

const App: Component = () => {
const init = initParticlesEngine(loadFull)
const [config, setConfig] = createSignal(configs.basic)

setTimeout(() => setConfig(configs.absorbers), 1000)

return (
<Show when={init()}>
<Particles id="tsparticles" options={config()}/>
</Show>
);
};

export default App;
15 replies
SSolidJS
Created by andahendriksen on 1/16/2025 in #support
Have anyone gotten ts particles to work in solid?
Seems like the README.md might be a bit outdated
15 replies
SSolidJS
Created by andahendriksen on 1/16/2025 in #support
Have anyone gotten ts particles to work in solid?
What does not work? Were there any error messages? Maybe let's start with resolving the red underline errors in your code? You probably need to import the appropriate functions
import { loadFull } from "tsparticles";
import Particles, { initParticlesEngine } from "@tsparticles/solid";
import { loadFull } from "tsparticles";
import Particles, { initParticlesEngine } from "@tsparticles/solid";
15 replies
SSolidJS
Created by chasingtheflow on 1/15/2025 in #support
How to set up a vite dev proxy with Start and Vinxi?
I believe you can just copy your entire Vite config to the vite key in your app.config.ts
4 replies
SSolidJS
Created by Jason.json on 1/3/2025 in #support
Post CSS with Solid Start
I don't know anything about PurgeCSS to be honest, so you would have to experiment with that. But I do agree that tsx instead of html is a reasonable assumption
11 replies
SSolidJS
Created by Jason.json on 1/3/2025 in #support
Post CSS with Solid Start
Or you can also use PurgeCSS directly, since Vite also supports PostCSS out-of-the-box, given you have a PostCSS config file at root level
// Create file: postcss.config.mjs
import { purgeCSSPlugin } from '@fullhuman/postcss-purgecss';

export default {
plugins: [
purgeCSSPlugin({
content: ['./**/*.html'],
}),
],
};
// Create file: postcss.config.mjs
import { purgeCSSPlugin } from '@fullhuman/postcss-purgecss';

export default {
plugins: [
purgeCSSPlugin({
content: ['./**/*.html'],
}),
],
};
11 replies
SSolidJS
Created by Jason.json on 1/3/2025 in #support
Post CSS with Solid Start
You can try using this plugin if you want to use PurgeCSS https://www.npmjs.com/package/@mojojoejo/vite-plugin-purgecss
11 replies
SSolidJS
Created by Jason.json on 1/3/2025 in #support
Post CSS with Solid Start
I don't believe Vite purges anything. It would be hard to detect which class and rules are actually used in your JavaScript code vs. what's not, especially when the content is dynamically generated like in JavaScript frameworks
11 replies
SSolidJS
Created by Jason.json on 1/3/2025 in #support
Post CSS with Solid Start
I believe Vite can process scss automatically https://vite.dev/guide/features#css-pre-processors and Vite should automatically analyze CSS imports for you
11 replies