hyrious

Results 217 comments of hyrious

> Well tbh, that doesn't sound 'developer friendly'. There're tons of tools around esbuild to make common tasks have good DX like `tsx` to execute scripts and `vite` to develop...

You can do this by yourself: ```js class A {} Object.defineProperty(A, "name", { value: "A", configurable: true }) ```

One possible way is to rewrite these `lazyLoad('path')` to `lazyLoad(() => require('path'))`. The later form can be statically analyzed by esbuild to make it able to bundle the file pointed...

`tsyringe` requires a feature ([`emitDecoratorMetadata`](https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata)) that involves type system which esbuild [cannot](https://esbuild.github.io/content-types/#typescript) provide. If you still want to use esbuild to bundle your source codes, you can use [plugins](https://esbuild.github.io/plugins/) to...

Since you're not enabling [bundling](https://esbuild.github.io/api/#bundle), the `require()` expressions are left as is (i.e. not bundled) and doing so in the bare browser environment will throw a `ReferenceError: require is not...

I see, you want to make the react module to become a global name `React`? If so, you can write a custom plugin to replace the react module with `module.exports...

The builtin watch mode logger does [not](https://github.com/evanw/esbuild/blob/65a4439ff7c469ffc654f497fe3dee6bb1fa2ddb/pkg/api/watcher.go#L115) provide a build time, however you can invent the wheel in the onEnd callback: ```js esbuild.context({ plugins: [{ name: 'rebuild-log', setup({ onStart, onEnd...

> `outputFiles` gets an array when I pass `write: false` in options. However, there is no output in that case. Yes, you have 2 choices: 1. Set `write: false`, then...

From my personal perspective, I do not want esbuild to convert ts `import` to js `require` by tsconfig. - It is only a historical behavior. Now the whole js community...

This issue is already tracked here: https://github.com/evanw/esbuild/issues/1921 In summary, this runtime error is caused by bundling CJS libraries into ESM context (i.e. bundle `express` in `format: 'esm'`). esbuild uses closures...