{"library":"oc-template-esm-compiler","title":"oc-template-esm-compiler","description":"Compiler for ESM OC (OpenComponents) templates. This package provides the build/compile step for components using the oc-template-esm template type. It is part of the OpenComponents ecosystem, which enables server-side rendering of composable UI components. Current stable version is 3.0.4, with a release cadence aligned with the OC monorepo. Key differentiator: it specifically handles ESM (ES Module) output, targeting modern bundlers and runtimes. It requires oc-server ^4.0.0 as a peer dependency and ships TypeScript types.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install oc-template-esm-compiler"],"cli":null},"imports":["import { compile } from 'oc-template-esm-compiler'","import type { CompileOptions } from 'oc-template-esm-compiler'","import type { CompileResult } from 'oc-template-esm-compiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { compile } from 'oc-template-esm-compiler';\n\nconst result = await compile({\n  componentPath: '/path/to/component',\n  componentName: 'my-component',\n  ocServerUrl: 'http://localhost:3000/',\n  ocTemplate: 'oc-template-esm',\n  production: true,\n  watch: false\n});\n\nconsole.log('Compiled files:', result.files);\nconsole.log('Hash:', result.hash);","lang":"typescript","description":"Demonstrates compiling an ESM OC component with minimal options, showing the async compile function and typical result.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}