Evan Wallace

Results 542 comments of Evan Wallace

The behavior of removing unused imports is just how TypeScript works. You can see that for yourself here, with the official TypeScript compiler: https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBGAhjAFnAZlCI4CIB2EAJgKYBcSquA3AFCiSxwkDOARgK7AA2RGWOXK048iNeuGjwW2EqmD4A5v2x4AdAHoZIEuh4k1AKxY0gA You have to set `preserveValueImports` to...

> The problem here, is that esbuild doesn't seem to look for `tsconfig.json` when input is ``, even though the `tsconfig` option is correctly set. This is a feature request....

FYI the new `banner` and `footer` options from #482 are now implemented and have been released. You should be able to implement this feature using those options.

Sorry but I'm unable to reproduce this given your description. Please provide instructions for how to reproduce the problematic behavior (including all source files, the esbuild command used for bundling,...

I do not view this as a problem with esbuild. You are running `import()` on a CommonJS file (the files in `dist` are considered to be CommonJS because of the...

I'm planning on releasing a form of this sometime soon. You can see my work in progress version here: #2508. This will initially require code splitting to be enabled (as...

One unusual thing about esbuild is that by default, the transform API does not assume that the provided input is a complete module. This allows for you to either run...

> It's about compatibility with TypeScript itself > > ```ts > import type Variable = Scope.Variable > ``` > > it's invalid TypeScript syntax AFAIK. If you only want a...

When in one-file-at-a-time mode, the official TypeScript compiler always removes `bar` completely if no code in the file uses it: [(TypeScript playground link)](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgZwiApgOQIYeWbAY3TgF84AzKNOAcgDoB6VDAWguABt1aAoUSLDgAjbFDgBeFGiy50+IunoUIEXkA). So in that sense it's side-effect free....

You are having trouble because you are trying to use this feature in a way that is not recommended. If you read [esbuild's documentation](https://esbuild.github.io/api/#mangle-props), you'll realize that the way you...