mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
WIP
This commit is contained in:
28
README.md
28
README.md
@@ -59,6 +59,30 @@ There's a number of reasons for this:
|
||||
|
||||
#### Different constraints enable performance improvements
|
||||
|
||||
If bundler means "merge N source files into 1 or few source file(s)", esdev is most definitely not a bundler. Unlike most bundlers today, esdev deliberately outputs
|
||||
If bundler means "merge N source files into 1 or few source file(s)", esdev is most definitely not a bundler. Unlike most bundlers today, esdev deliberately outputs
|
||||
|
||||
If bundler means "turn my development code into something a browser can run",
|
||||
If bundler means "turn my development code into something a browser can run",
|
||||
|
||||
### Compatibility Table
|
||||
|
||||
Key:
|
||||
|
||||
- ✅ means "compatible"
|
||||
- ❌ means "not supported, and no plans to change that"
|
||||
- ⌛ means "in-progress"
|
||||
- 🗓️ means "planned" or "eventually but work has not started"
|
||||
- ❓ means "unknown"
|
||||
|
||||
| Feature | esbuild | esdev |
|
||||
| ---------------------------------- | ------- | ----- |
|
||||
| Minification | ✅ | ❌ |
|
||||
| JSX (transform) | ✅ | ⌛ |
|
||||
| TypeScript (transform) | ✅ | ⌛ |
|
||||
| Hot Module Reloading | ❌[1] | ⌛ |
|
||||
| React Fast Refresh | ❌[1] | ⌛ |
|
||||
| Tree Shaking | ✅ | ⌛ |
|
||||
| Incremental builds | ✅ | ⌛ |
|
||||
| Support older browsers | ✅ | ❌[2] |
|
||||
| Plugins | ✅ | ⌛[3] |
|
||||
| AST Plugins | ❌ | ❌[4] |
|
||||
| Filesystem Cache API (for plugins) | ❓ | 🗓️[4] |
|
||||
|
||||
@@ -13,6 +13,7 @@ usingnamespace js_ast.G;
|
||||
|
||||
const ImportKind = importRecord.ImportKind;
|
||||
const BindingNodeIndex = js_ast.BindingNodeIndex;
|
||||
|
||||
const StmtNodeIndex = js_ast.StmtNodeIndex;
|
||||
const ExprNodeIndex = js_ast.ExprNodeIndex;
|
||||
const ExprNodeList = js_ast.ExprNodeList;
|
||||
@@ -997,14 +998,15 @@ const P = struct {
|
||||
std.debug.panic("Internal error", .{});
|
||||
}
|
||||
|
||||
// for name, member := range scope.parent.members {
|
||||
// // Don't copy down the optional function expression name. Re-declaring
|
||||
// // the name of a function expression is allowed.
|
||||
// kind := p.symbols[member.Ref.InnerIndex].Kind
|
||||
// if kind != js_ast.SymbolHoistedFunction {
|
||||
// scope.Members[name] = member
|
||||
// }
|
||||
// }
|
||||
var iter = scope.parent.?.members.iterator();
|
||||
while (iter.next()) |entry| {
|
||||
// // Don't copy down the optional function expression name. Re-declaring
|
||||
// // the name of a function expression is allowed.
|
||||
const adjacent_symbols = p.symbols.items[entry.value.ref.inner_index];
|
||||
if (adjacent_symbols.kind != .hoisted_function) {
|
||||
try scope.members.put(entry.key, entry.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
|
||||
Reference in New Issue
Block a user