{"id":26070,"library":"pawajs-vite-plugin","title":"vite-plugin-pawajs","description":"A Vite plugin for PawaJS component files that ensures minifier-safe return statements and injects automatic component names. Current version 0.0.4, actively maintained. Uses estree-walker and magic-string for AST transforms. Works with JavaScript and TypeScript. Differentiates by specifically targeting PawaJS framework, unlike general-purpose Vite plugins.","status":"active","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/Allisboy/pawajs-vite-plugin","tags":["javascript","vite","plugin","pawajs"],"install":[{"cmd":"npm install pawajs-vite-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add pawajs-vite-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add pawajs-vite-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: plugin runs only within Vite build pipeline.","package":"vite","optional":false},{"reason":"Used to traverse and transform AST nodes.","package":"estree-walker","optional":false},{"reason":"Used for efficient source string manipulation.","package":"magic-string","optional":false}],"imports":[{"note":"Plugin is a named export, not default. This is the only export.","wrong":"import pawajsPlugin from 'vite-plugin-pawajs'","symbol":"pawajsPlugin","correct":"import { pawajsPlugin } from 'vite-plugin-pawajs'"},{"note":"CJS require works but must destructure the named export.","wrong":"const pawajsPlugin = require('vite-plugin-pawajs');","symbol":"pawajsPlugin","correct":"const { pawajsPlugin } = require('vite-plugin-pawajs');"},{"note":"Using default import will fail with error 'pawajsPlugin is not a function'.","wrong":"import pawajsPlugin from 'vite-plugin-pawajs';","symbol":"pawajsPlugin","correct":"// In vite.config.ts\nimport { pawajsPlugin } from 'vite-plugin-pawajs'"}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite';\nimport { pawajsPlugin } from 'vite-plugin-pawajs';\n\nexport default defineConfig({\n  plugins: [pawajsPlugin()]\n});\n\n// Then use .pawa files in your project","lang":"typescript","description":"Integrate the PawaJS Vite plugin into your Vite configuration to enable component transformation."},"warnings":[{"fix":"Ensure your PawaJS component files have .pawa extension.","message":"Plugin only transforms files with .pawa extension. Other files are ignored.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Check release notes and update your config as needed.","message":"Version 0.0.4 may have breaking changes from earlier versions due to early development stage.","severity":"breaking","affected_versions":"<0.0.4"},{"fix":"Lock your dependency version and monitor changelog.","message":"The plugin is still in early development; APIs may change without major version bump.","severity":"deprecated","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure .pawa files contain at least one component export or non-empty source.","cause":"Plugin may fail if input file is empty or has no component registration.","error":"Cannot read properties of undefined (reading 'length')"},{"fix":"Reorder plugins: pawajsPlugin before other transform plugins.","cause":"Magic-string source map generation might conflict if other plugins also manipulate the same file.","error":"Error: Could not source map for ..."},{"fix":"Check that your .pawa file uses valid PawaJS syntax; avoid experimental ECMAScript features.","cause":"PawaJS files contain syntax not yet supported by estree-walker or Vite parser.","error":"SyntaxError: Unexpected token"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}