vite-syntax-assets

Enforce correct asset import and query suffix patterns in Vite projects.

3|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Vite-Claude-Skill-Package --skill vite-syntax-assets-impertio-studio
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vite-syntax-assets
Source: https://github.com/Impertio-Studio/Vite-Claude-Skill-Package/tree/main/skills/source/vite-syntax/vite-syntax-assets
Command: npx skills add https://github.com/Impertio-Studio/Vite-Claude-Skill-Package --skill vite-syntax-assets-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use when importing static assets, using glob imports, configuring the public directory, loading Web Workers, or handling WebAssembly modules. Prevents incorrect query suffix usage, broken new URL() patterns, and misconfigured public directory paths. Covers asset imports, query suffixes (?url, ?raw, ?inline, ?worker), import.meta.glob, public directory, JSON imports, WebAssembly ?init, and Web Worker patterns.

Core Features & Use Cases

  • Asset import behavior, query suffix handling, glob imports, and publicDir guidance across Vite 6–8.
  • JSON imports, WebAssembly ?init usage, and Web Worker construction patterns with static analysis constraints.
  • Real-world scenario: ensure consistent asset resolution and worker initialization in a large Vite project.

Quick Start

Configure Vite to import assets using the standard suffixes and worker patterns described in this guide.

Frequently Asked Questions about vite-syntax-assets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import static assets correctly in Vite?▼

Vite handles static asset imports by using specific query suffixes such as ?url, ?raw, and ?inline. Applying these suffixes correctly ensures proper asset resolution and prevents broken URL patterns across Vite 6 to 8 environments.

What is the correct syntax for loading Web Workers in Vite?▼

Load Web Workers in Vite using the ?worker query suffix. This Skill enforces correct worker construction patterns and static analysis constraints to ensure proper initialization in Vite projects.

How does import.meta.glob work for glob imports in Vite?▼

import.meta.glob matches files using glob patterns to import multiple modules. This Skill provides guidance on glob options and usage to ensure consistent asset resolution in large Vite projects.

Does Vite support WebAssembly module initialization?▼

Yes, Vite supports WebAssembly initialization using the ?init query suffix. This Skill enforces correct WebAssembly ?init usage and static analysis constraints for loading WebAssembly modules in Vite.

Why is my public directory path misconfigured in Vite?▼

Public directory paths in Vite become misconfigured when publicDir handling is incorrect. This Skill provides publicDir guidance to prevent broken paths and ensure proper asset handling across Vite 6 to 8.

What are the limitations of using new URL() for assets in Vite?▼

Using new URL() for assets in Vite has static analysis constraints that can break asset resolution if configured incorrectly. This Skill prevents broken new URL() patterns and enforces correct query suffix usage.