{"id":25557,"library":"eustia-component","title":"Eustia Component Transpiler","description":"A transpiler plugin for the Eustia build tool that converts HTML files containing inline styles, templates, and scripts into pure JavaScript modules. Version 0.0.3 is the latest release. It is designed for use with Eustia to simplify authoring reusable UI components with HTML and CSS, without relying on web components. The transpiler extracts CSS into a string variable, HTML templates into string variables, and concatenates script content, providing a simple component pattern for library authors.","status":"active","version":"0.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/surunzi/eustia-component","tags":["javascript","eustia","transpiler","html","component"],"install":[{"cmd":"npm install eustia-component","lang":"bash","label":"npm"},{"cmd":"yarn add eustia-component","lang":"bash","label":"yarn"},{"cmd":"pnpm add eustia-component","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package exports a function that should be called to create a handler, not the handler itself.","wrong":"const eustiaComponent = require('eustia-component')()","symbol":"eustia-component","correct":"const eustiaComponent = require('eustia-component')"},{"note":"You must invoke the function with no arguments to get the transpiler handler.","wrong":"handler: require('eustia-component')","symbol":"handler","correct":"handler: require('eustia-component')()"},{"note":"This package only supports CommonJS; use require() or default import in TypeScript with esModuleInterop.","wrong":"import { eustiaComponent } from 'eustia-component'","symbol":"EustiaComponent","correct":"import eustiaComponent from 'eustia-component'"}],"quickstart":{"code":"// eustia.config.js\nmodule.exports = {\n    util: {\n        files: 'index.html',\n        extension: ['js', 'html'],\n        transpiler: [\n            {\n                test: /\\.html$/,\n                handler: require('eustia-component')()\n            }\n        ]\n    }\n};","lang":"javascript","description":"Shows how to configure Eustia to use eustia-component as a transpiler for .html files."},"warnings":[{"fix":"Consider using modern component frameworks like Vue or React if Eustia support is discontinued.","message":"Package is very low version and rarely updated; may not be maintained for future Eustia versions.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use handler: require('eustia-component')()","message":"The exported function must be called with no arguments to get the transpiler handler; directly using require('eustia-component') as handler will fail.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure Eustia is properly configured in your project.","message":"The plugin only works within the Eustia build system; it is not a standalone HTML-to-JS converter.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install eustia-component'","cause":"Package not installed or missing in node_modules.","error":"Error: Cannot find module 'eustia-component'"},{"fix":"Change handler: require('eustia-component') to handler: require('eustia-component')()","cause":"Using require('eustia-component') instead of require('eustia-component')().","error":"TypeError: handler is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}