Skip to content

Instantly share code, notes, and snippets.

View hyfdev's full-sized avatar
🧙‍♂️
Spelling

Yunfei He hyfdev

🧙‍♂️
Spelling
View GitHub Profile
@hyfdev
hyfdev / executor.ts
Created May 22, 2026 13:43
ClickUp Vite-direct build executor — rolldown chunking config (see https://gist.github.com/hyf0/93d53718780efc57019cfe7d5e7fc1c4)
import { ExecutorContext } from '@nx/devkit';
import browserslist from 'browserslist';
import browserslistToEsbuild from 'browserslist-to-esbuild';
import assert from 'node:assert';
import path from 'node:path';
import { build } from 'vite';
import { getBuildTargetConfig } from '@cu/nx-plugin-bundler/common/nx/target-config/get-target-config';
import { getPlugins } from '../../common/get-plugins';
@hyfdev
hyfdev / chunking-strategy.md
Last active May 22, 2026 13:41
Chunking strategy for ClickUp's Vite-direct build — 3-layer framework, config explained, open issues, perf vs baseline
@hyfdev
hyfdev / lobehub-case-study.md
Last active April 19, 2026 15:51
LobeHub SPA: Chunking Strategy Case Study — codeSplitting.groups best practice with $initial tag split

LobeHub SPA: Chunking Strategy — Case Study

A real‑network evaluation of four chunking configs on LobeHub's Vite SPA. Two baselines (Rolldown default codeSplitting: true and the repo's previous manualChunks), the Rolldown codeSplitting.groups recipe from [the gist][gist], and a refined "best practice" variant that fixes the recipe's lazy‑loading regression on this codebase. Companion piece to the App‑X case study; shows where the gist recipe doesn't transfer cleanly and why.

name vue-tsc-compiler-options
description Configures Vue 3 template type checking via vueCompilerOptions in tsconfig.app.json. Covers strictTemplates, checkUnknownComponents, checkUnknownProps, checkUnknownEvents, and checkUnknownDirectives. Use when setting up vue-tsc, diagnosing unknown component errors, or enabling strict template validation.

Vue Compiler Options for Type Checking

Which tsconfig?

Add vueCompilerOptions to the tsconfig that includes Vue source files. In projects with multiple tsconfigs, this is typically tsconfig.app.json, not the root tsconfig.json or tsconfig.node.json.

@hyfdev
hyfdev / SKILL.md
Created November 12, 2025 06:12
ast-grep-search
name ast-grep-search
description Syntax-aware code searching that understands code structure rather than just text patterns. Always prefer ast-grep than grep for code searches.
allowed-tools Read, Grep, Bash(ast-grep:*), Bash(sg:*)

ast-grep: Structural Code Search

ast-grep allows searching code based on its Abstract Syntax Tree (AST), enabling syntax-aware pattern matching. It is ideal for finding function calls, method invocations, variable declarations, and other code structures while respecting language syntax.