npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fukict/vite-plugin

v0.1.8

Published

Vite plugin for Fukict framework

Readme

@fukict/vite-plugin

Official Vite plugin for Fukict framework.

Features

  • ✅ Zero-config setup
  • ✅ TypeScript support (built-in)
  • ✅ Auto component wrapping with defineFukict
  • ✅ JSX to hyperscript transformation
  • ✅ Development mode enhancements
  • ✅ Source map support

Installation

pnpm add -D @fukict/vite-plugin
pnpm add @fukict/basic

Usage

Basic Setup

vite.config.ts:

import fukict from '@fukict/vite-plugin';

import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [fukict()],
});

That's it! The plugin will automatically:

  1. Transform JSX to hyperscript() calls
  2. Auto-wrap components with defineFukict()
  3. Handle TypeScript syntax
  4. Inject displayName in development mode

With Options

import fukict from '@fukict/vite-plugin';

import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [
    fukict({
      // Include patterns (default: /\.[jt]sx$/)
      include: /\.[jt]sx$/,

      // Exclude patterns (default: /node_modules/)
      exclude: /node_modules/,

      // Babel options
      babel: {
        // Development mode (default: NODE_ENV !== 'production')
        development: true,

        // TypeScript support (default: true)
        typescript: true,
      },
    }),
  ],
});

Options

include

Type: RegExp | RegExp[] Default: /\.[jt]sx$/

Files to include for transformation.

Example:

fukict({
  include: [/\.tsx$/, /\.jsx$/],
});

exclude

Type: RegExp | RegExp[] Default: /node_modules/

Files to exclude from transformation.

Example:

fukict({
  exclude: [/node_modules/, /\.spec\.tsx$/],
});

babel.development

Type: boolean Default: process.env.NODE_ENV !== 'production'

Enable development mode features (like displayName injection).

babel.typescript

Type: boolean Default: true

Enable TypeScript support.

How It Works

The plugin uses @fukict/babel-preset under the hood to transform your code:

// Input
const Greeting = ({ name }) => <div>Hello {name}</div>;

// Output
import { defineFukict, hyperscript } from '@fukict/basic';

const Greeting = defineFukict(({ name }) =>
  hyperscript('div', null, ['Hello ', name])
);
Greeting.displayName = 'Greeting'; // in development mode

TypeScript Configuration

tsconfig.json:

{
  "compilerOptions": {
    "jsx": "preserve",
    "jsxImportSource": "@fukict/basic"
  }
}

Examples

Basic Counter

// src/Counter.tsx
export const Counter = () => {
  let count = 0;

  const increment = () => {
    count++;
    // Re-render logic here
  };

  return (
    <div>
      <p>Count: {count}</p>
      <button on:click={increment}>+</button>
    </div>
  );
};

With Class Component

import { Fukict } from '@fukict/basic';

export class Timer extends Fukict<{}> {
  private count = 0;
  private timer?: number;

  mounted() {
    this.timer = setInterval(() => {
      this.count++;
      this.update(this.props);
    }, 1000);
  }

  beforeUnmount() {
    clearInterval(this.timer);
  }

  render() {
    return <div>Timer: {this.count}</div>;
  }
}

FAQ

Q: Do I need to manually configure Babel?

A: No! The plugin automatically configures everything for you.

Q: Can I use this with other Vite plugins?

A: Yes, just add it to the plugins array along with other plugins.

Q: Does it work with TypeScript?

A: Yes, TypeScript support is built-in and enabled by default.

Q: How do I disable auto component wrapping?

A: Use the @nofukict comment:

/** @nofukict */
const MyFunction = () => <div />;

Troubleshooting

JSX not transforming

Check:

  1. File extension is .jsx or .tsx
  2. tsconfig.json has "jsx": "preserve"
  3. Plugin is added to Vite config

TypeScript errors

Check:

  1. @fukict/basic is installed
  2. jsxImportSource is set to "@fukict/basic"
  3. TypeScript version >= 5.0.0

Related Packages

  • @fukict/basic - Fukict runtime (required)
  • @fukict/babel-preset - Babel preset (used internally)

License

MIT