{"id":41651,"library":"oc-template-solid-compiler","title":"OC SolidJS Template Compiler","description":"Compiler for OpenComponents templates using SolidJS. Version 4.0.0 compiles components of type 'oc-template-solid'. Part of the OpenComponents ecosystem, it enables server-side rendering and client-side hydration of SolidJS components within the OC micro-frontend framework. Bundles SolidJS components for OC registries, supporting TypeScript types. Release cadence follows the vite-templates monorepo.","status":"active","version":"4.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/opencomponents/vite-templates","tags":["javascript","oc","opencomponents","solidjs","oc-template","typescript"],"install":[{"cmd":"npm install oc-template-solid-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add oc-template-solid-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add oc-template-solid-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency to compile SolidJS components","package":"solid-js","optional":false},{"reason":"Template type expected by OC registry","package":"oc-template-solid","optional":false}],"imports":[{"note":"Default export is not available; use named import.","wrong":"import compile from 'oc-template-solid-compiler'","symbol":"compile","correct":"import { compile } from 'oc-template-solid-compiler'"},{"note":"CJS require works but named export is preferred for tree-shaking.","wrong":"const getInfo = require('oc-template-solid-compiler').getInfo","symbol":"getInfo","correct":"import { getInfo } from 'oc-template-solid-compiler'"},{"note":"This package exports its own render function for OC templates, not from solid-js/web.","wrong":"import { render } from 'solid-js/web'","symbol":"render","correct":"import { render } from 'oc-template-solid-compiler'"}],"quickstart":{"code":"import { compile } from 'oc-template-solid-compiler';\nconst source = `\n  import { createSignal } from 'solid-js';\n  export default function Counter() {\n    const [count, setCount] = createSignal(0);\n    return <button onClick={() => setCount(c => c + 1)}>{count()}</button>;\n  }\n`;\nconst result = compile(source, {\n  template: {\n    type: 'oc-template-solid',\n    version: '4.0.0'\n  }\n});\nconsole.log(result.compiledComponent);","lang":"typescript","description":"Compiles a SolidJS component source string into an OC-compatible component using the compile function."},"warnings":[{"fix":"Update compile call to include template object.","message":"Version 4.0.0 changes the compile function signature; options object now requires 'template.type' and 'template.version' explicitly.","severity":"breaking","affected_versions":"<=3.x"},{"fix":"Use compiled component from compile function.","message":"The 'render' function is deprecated in favor of using 'compile' output directly via the OC registry.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Ensure 'import { createSignal, createEffect } from 'solid-js'' is present in component source.","message":"SolidJS reactive primitives must be imported from 'solid-js' even when using this compiler; the compiler does not auto-inject them.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'4.0.0':12 'bundl':47 'cadenc':57 'client':34 'client-sid':33 'compil':4,5,13 'compon':14,39,49 'ecosystem':25 'enabl':27 'follow':58 'framework':46 'frontend':45 'hydrat':36 'javascript':64 'micro':44 'micro-frontend':43 'monorepo':63 'oc':1,18,42,51,65,69 'oc-templ':68 'oc-template-solid':17 'opencompon':7,24,66 'part':21 'registri':52 'releas':56 'render':31 'server':29 'server-sid':28 'side':30,35 'solid':20 'solidj':2,10,38,48,67 'support':53 'templat':3,8,19,62,70 'type':16,55 'typescript':54,71 'use':9 'version':11 'vite':61 'vite-templ':60 'within':40","created_at":"2026-06-04T18:53:27.297515+00:00","updated_at":"2026-06-04T18:53:27.297515+00:00","problems":[{"fix":"Run: npm install solid-js","cause":"solid-js not installed as a dependency.","error":"Error: Cannot find module 'solid-js'"},{"fix":"Change import to: import { compile } from 'oc-template-solid-compiler'","cause":"Using default import instead of named import.","error":"TypeError: compile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/opencomponents/vite-templates#readme","github":"https://github.com/opencomponents/vite-templates","docs":null,"changelog":null,"pypi":null,"npm":"oc-template-solid-compiler","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}