esbuild
esbuild copied to clipboard
An extremely fast bundler for the web
This is a batch of several breaking changes. I'm planning to release them together in an upcoming release. TL;DR: `new URL(...)` and glob `import()`. In detail: * Interpret and rewrite...
```js import esbuild from 'esbuild' import watPlugin from 'esbuild-plugin-wat' import aliasPlugin from 'esbuild-plugin-path-alias' import path from 'path' import { fileURLToPath } from 'url' import { minify } from 'uglify-js' const...
## Problem Currently, when applying syntax transformations via transform API, helper methods are inlined to the top of the file. Because they are inlined, they can be duplicated in a...
I am looking into incorporating esbuild into an existing project that does not use NPM or node.js. Therefore I am looking at the esbuild executable for minifying CSS and JS...
For example, the source code as like: ```typescript const cwd = process.cwd(); export {} ``` Will be minified to: ```javascript var c=process.cwd(); ``` The variable `c` is unused but not...
When dealing with paths in Node.js, people often use URL instances. This is especially true when writing ESM scripts, where `import.meta.url` is available, but not `__dirname`, or `__filename`. The Node.js...
Similar to rollup's extend option The general logic is as follows: ```js var _exports=......; if(globalThis.xyz){ xyz=Object.assign({},xyz,_exports); } else{ globalThis.xyz=_exports; } ```
Hello! Is there any plan to support assets bundling using the URL constructor and import.meta? Something like this: ```js const myImg = new URL('./assets/my-img.png', import.meta.url); ``` would be equivalent to:...
- follow https://github.com/microsoft/TypeScript/pull/46827
There are important use cases when it is valuable to get the bundled URL of a file, such as for web worker instantiation: https://github.com/evanw/esbuild/issues/312 This PR allows `esbuild` to handle...