Skip to content

Plugin doesn't return html files #61

Description

@bmakan
Package Version
OS Ubuntu 22.04
bun 1.3.10
elysia 1.4.27
@elysiajs/static 1.4.0

index.ts:

import { staticPlugin } from '@elysiajs/static';
import { Elysia } from 'elysia';

const app = new Elysia()
    .use(staticPlugin({ alwaysStatic: true, assets: 'public', prefix: '' }))
    .listen(5000);
Image
curl http://localhost:5000/assets/index-DNj1e2My.css
<bunch-of-text>

curl http://localhost:5000/index.html

Errors:

error: Could not resolve: "/assets/favicon-BdpMD4WA.png"
    at /home/bmakan/ws/sentinel/src/server/public/index.html

error: Could not resolve: "/assets/index-D5ZQDunl.js"
    at /home/bmakan/ws/sentinel/src/server/public/index.html

error: Could not resolve: "/assets/index-DNj1e2My.css"
    at /home/bmakan/ws/sentinel/src/server/public/index.html

It looks like bun/elysia are parsing the HTML file for whatever reason and trying to find the assets.

With:

indexHTML: true
curl http://localhost:5000

returns

{}

Last working version is 1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions