OC-Vite-Compiler is an OC (OpenComponents) module that compiles view and server code using Vite. Version 6.0.0 is the latest stable release, with a focus on providing fast builds and HMR for OC components. It integrates Vite's bundling capabilities into the OC ecosystem, enabling ESM and TypeScript support. The package ships TypeScript types and is part of the OpenComponents toolchain. Release cadence is sporadic, tied to OC updates. Key differentiator: leverages Vite for modern, fast development experience versus traditional webpack-based compilers.
npm install oc-vite-compilerVerified import paths — ran on the pinned version, not inferred.
Demonstrates compiling an OC component using oc-vite-compiler with options for component path, server, and view files.
Upgrade Node.js to 16+.
Update from import compiler from 'oc-vite-compiler/legacy' to new API.
Use default export directly from 'oc-vite-compiler'.
Remove 'root' and 'build.outDir' from viteConfig option.
Use dynamic import() or switch to ESM.
Use import statement or dynamic import() in ESM context.
Use default import from 'oc-vite-compiler'.
Use 'import compiler from 'oc-vite-compiler'' for default export.
No dependency data recorded yet.