New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@aippy/vite-plugins

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aippy/vite-plugins

Vite plugins for Aippy projects - Asset management and component tagging

latest
npmnpm
Version
0.2.7
Version published
Maintainers
2
Created
Source

@aippy/vite-plugins

Vite plugins collection for Aippy projects, providing asset management and component tagging capabilities.

Installation

pnpm add -D @aippy/vite-plugins

Plugins

1. Asset Constants Plugin

Generates constant references for static assets and replaces hardcoded paths.

import { assetConstantsPlugin } from '@aippy/vite-plugins/asset-constants'

export default defineConfig({
  plugins: [
    assetConstantsPlugin({
      extensions: ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.mp4', '.mp3'],
      srcDir: 'src',
      outputFile: 'src/config/assets.json',
      devMode: true
    })
  ]
})

2. Aippy Preload Plugin

Scans build output and generates preload meta tags for assets.

import { aippyPreloadPlugin } from '@aippy/vite-plugins/aippy-preload'

export default defineConfig({
  plugins: [
    aippyPreloadPlugin({
      extensions: ['.js', '.css', '.png', '.jpg', '.svg'],
      outDir: 'dist',
      includeSubdirs: true
    })
  ]
})

3. Aippy Tagger Plugin

Tags React components with metadata for development tools and inspector.

import { aippyTaggerPlugin } from '@aippy/vite-plugins/aippy-tagger'

export default defineConfig({
  plugins: [
    aippyTaggerPlugin()
  ]
})

All-in-One Import

import { assetConstantsPlugin, aippyPreloadPlugin, aippyTaggerPlugin } from '@aippy/vite-plugins'

Utility Functions

The package also exports utility functions that can be used independently:

import { 
  processAssetURL, 
  isValidAsset, 
  generateConstantName, 
  extractAssetsFromContent,
  findProjectRoot 
} from '@aippy/vite-plugins/utils'

// Process asset URLs
const processedUrl = processAssetURL('./image.png') // '/image.png'

// Validate asset paths
const isValid = isValidAsset('./image.png') // true

// Generate constant names
const constantName = generateConstantName('/image.png') // 'IMAGE_ABCD'

// Extract assets from content
const assets = extractAssetsFromContent(htmlContent, 'html', ['.png', '.jpg'])

// Find project root
const projectRoot = findProjectRoot() // '/path/to/project'

License

UNLICENSED - Aippy Team

Keywords

aippy

FAQs

Package last updated on 18 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts