Skip to content

Does it work with @elysiajs/node? #45

Description

@myxious

When I set alwaysStatic to true I get this errors:

ReferenceError: Bun is not defined
    at staticPlugin (C:\git\demo\node_modules\@elysiajs\static\dist\cjs\index.js:174:20)

Can I use this plugin with node.js?

My code:

new Elysia({ adapter: node() })
  .use(routeApi)
  .use(staticPlugin({
    indexHTML: true,
    alwaysStatic: true,
    prefix: '/',
  }))
  .listen(3000, ({ hostname, port }) => {
    console.log(`🦊 Elysia is running at ${hostname}:${port}`);
  });

@elysiajs/static version is 1.2.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