-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundler API: Bun.build
and Bun.App
#2551
Conversation
@@ -0,0 +1,40 @@ | |||
export const enum MessageLevel { | |||
err = 1, |
There was a problem hiding this comment.
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[]; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
915a86f
to
d3d22dc
Compare
Is it possible to make public/static assets directory copying into the 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. |
Please include this in a release soon - it's a great feature and there are tons of cool uses. |
@Jarred-Sumner where can I read why you changed your mind about adding Bun.App? |
@zoto-ff We didn't change our minds, we were just cleaning up old PRs. We do plan to work on this. |
Bun.build
: https://github.com/oven-sh/bun/pull/2551/files#diff-615bae9797b92e446c305f4a56187c6c21cf18a90f1c333f62a33419d11bd27aBun.App
: https://github.com/oven-sh/bun/pull/2551/files#diff-f92bef874055902ce7eee54c5fa08ca72995598a7de52c1120f720e657fc7ca6