array(1) { [0]=> object(WP_Term)#6886 (10) { ["term_id"]=> int(2267) ["name"]=> string(15) "xpress recenzje" ["slug"]=> string(17) "xpress-recenzje-2" ["term_group"]=> int(0) ["term_taxonomy_id"]=> int(2267) ["taxonomy"]=> string(8) "category" ["description"]=> string(0) "" ["parent"]=> int(0) ["count"]=> int(1) ["filter"]=> string(3) "raw" } }

That it API alternative lets you identify the functional directory to make use of toward create

26 Th9, 2022

That it API alternative lets you identify the functional directory to make use of toward create

They typically non-payments to the current operating listing of the procedure you are using to-name esbuild’s API. The working directory can be used from the esbuild for most various other things in addition to resolving relative pathways given once the API choices to pure paths and quite-print natural pathways as the relative routes during the record messages. Information on how so you can bypass they:

#JS-particular details

The newest node-situated JS API comes in one another synchronous and you can xpress asynchronous flavors, for every single with assorted tradeoffs. It’s important to understand the distinctions to choose the fresh new best one for your condition:

#Sync API

  • To avoid claims can result in vacuum cleaner password
  • Work in things that have to be synchronous particularly within this wanted .extensions
  • You cannot use plugins towards the synchronous API while the plugins are asynchronous
  • They prevents the current thread which means you cannot create almost every other work in the meantime
  • With the synchronous API suppress esbuild out-of parallelizing esbuild API phone calls

#Async API

  • You can use plugins toward asynchronous API
  • The present day bond isn’t banned in order to carry out most other work in the brand new interim
  • You might manage of a lot parallel esbuild API phone calls in addition which are following bequeath all over all readily available CPUs for maximum show
  • Having fun with guarantees can lead to messier code, especially in CommonJS where greatest-height wait a little for isn’t offered
  • Can not work into the products that must be parallel particularly contained in this want .extensions

#Powering regarding the internet browser

The latest esbuild API also can run in the fresh new internet browser having fun with WebAssembly inside the a web Worker. When deciding to take advantageous asset of which you will need to create this new esbuild-wasm plan instead of the esbuild plan:

New API into internet browser is similar to the new API to have node aside from you ought to call initialize() basic, and you should violation the latest Url of one’s WebAssembly digital. Brand new parallel models of the API also are unavailable. Of course, if you are using good bundler, that would search something such as this:

If you find yourself currently running so it password regarding a member of staff plus don’t require initialize to produce various other worker, you could potentially admission staff member: incorrect to it. Then it will generate an excellent WebAssembly module in identical bond due to the fact thread one calls initialize .

New API are going to be accessed in another of three straight ways: on the command range, in the JavaScript, and in Wade. This new maxims and you can details are mainly identical between the around three dialects so that they will be presented along with her right here in the place of which have separate documents for each code.

There are 2 API contacts esbuild’s API: changes and build. It is vital to know what type you need to be playing with because the they work in a different way.

If you use JavaScript definitely have a look at JS-specific information area below. You can discover the TypeScript method of meanings to own esbuild helpful because the a research. When you use Go make sure you take a look at instantly made Wade documentation.

When you use the order-range API, it may be beneficial to remember that the flags have certainly one of three versions: –foo , –foo=pub , or –foo:pub . The form –foo is used to have permitting boolean flags for example –minify , the shape –foo=pub is utilized having flags having one value and you may are just specified immediately following like –platform= , together with means –foo:pub is utilized to possess flags which have multiple opinions and certainly will be lso are-specified several times eg –external: .

#Changes API

The latest change API label works on a single sequence in the place of accessibility so you’re able to a document system. This makes it perfect for use in surroundings instead of a document system (like a browser) otherwise included in another unit chain. Here is what a simple alter works out:

Chia sẻ bài viết: icon
Tìm kiếm
Danh mục