bimba-cli 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/serve.js +2 -0
package/package.json
CHANGED
package/serve.js
CHANGED
|
@@ -691,6 +691,8 @@ export function serve(entrypoint, flags) {
|
|
|
691
691
|
// Serve a resolved file: compile .imba, wrap CJS as ESM, pass ESM through
|
|
692
692
|
const serveResolved = async (filePath) => {
|
|
693
693
|
if (filePath.endsWith('.imba')) {
|
|
694
|
+
const f = Bun.file(filePath)
|
|
695
|
+
if (!(await f.exists())) return null
|
|
694
696
|
const out = await compileFile(filePath)
|
|
695
697
|
if (out.errors?.length) return new Response(out.errors.map(e => e.message).join('\n'), { status: 500 })
|
|
696
698
|
return new Response(out.js, { headers: { 'Content-Type': 'application/javascript' } })
|