Skip to content

Conversation

@colinhacks colinhacks changed the title Bundler API Apr 20, 2023
@@ -0,0 +1,40 @@
export const enum MessageLevel {
err = 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make these align with console.x, e.g. error, warn, info, debug (do we need "note"?)

export interface Log {
warnings: number;
errors: number;
msgs: Message[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

messages pls

on: MessageMeta;
}

export interface Log {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this has an extra layer of nesting that doesn't add a lot of value.

Current:

{
   log: {
      warnings: 0,
      errors: 0,
      messages: []
   }
}

Alternative (simplified)

{
   errors: [],
   warnings: []
}
column: number;
line_text: string;
suggestion: string;
offset: number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the index of the location? (e.g. line + col mapped to an array)

namespace: string;
line: number;
column: number;
line_text: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just text? to match with MessageData#text and also to avoid snake-case.

level: MessageLevel;
data: MessageData;
notes: MessageData[];
on: MessageMeta;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused what this would look like.

@colinhacks colinhacks force-pushed the rfc/bun-bundler-api branch from 915a86f to d3d22dc Compare May 31, 2023 00:55
@phenomen
Copy link

phenomen commented Sep 12, 2023

Is it possible to make public/static assets directory copying into the outdir a part of Bun.build, not Bun.app?

I build a library (not app) with assets (images, css, fonts, json) that I don't import directly in the code but reference them with absolute paths. Those static assets should not be transformed.

It would match Vite's public directory behavior that put public folder into the bundle without transforms on build step.

@ghost
Copy link

ghost commented Jan 10, 2024

Please include this in a release soon - it's a great feature and there are tons of cool uses.

@ghost
Copy link

ghost commented Aug 1, 2024

@Jarred-Sumner where can I read why you changed your mind about adding Bun.App?

@Electroid
Copy link
Contributor

@zoto-ff We didn't change our minds, we were just cleaning up old PRs. We do plan to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants