0.4.0 • Published 9 months ago

solid-lazy-plus v0.4.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
9 months ago

Solid Lazy Plus

This is a drop-in replacement for Solids lazy utility specifically to be used in SolidStart projects. Compared to the original, this has the ability to properly register css assets of lazy loaded components during server-side rendering, in production builds.

This is experimental, third-party functionality and hopefully will be integrated into an official solid package, if it proves useful.

Vinxi configuration (app.config.ts)

import { defineConfig } from "@solidjs/start/config";
import lazyPlusPlugin from "solid-lazy-plus/vite";

export default defineConfig({
  vite(options) {
    return {
      plugins: [lazyPlusPlugin({ router: options.router })],
    };
  },
});

Usage

import { lazy } from "solid-lazy-plus";

// wrap import
const ComponentA = lazy(() => import("./ComponentA"));

// use in JSX
<ComponentA title={props.title} />;
0.4.0

9 months ago

0.3.0

11 months ago

0.2.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago