JSPM

preact-cli-plugin-fast-async

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 292
  • Score
    100M100P100Q91576F
  • License MIT

Preact CLI plugin that adds support for async/await via fast-async

Package Exports

  • preact-cli-plugin-fast-async

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (preact-cli-plugin-fast-async) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

preact-cli-plugin-fast-async

npm travis

Preact CLI plugin that adds optimized support for async/await via fast-async.

Why do I want this?

Normally, transpiling async/await produces a large amount of code and depends on a runtime like regenerator-runtime. While that is optimal from a compatibility standpoint, it's not so great for bundle size. Using fast-async, this plugin transforms your async functions into Promises just like you would write by hand!

Installation

npm i -D preact-cli-plugin-fast-async

... then include it in your project by creating a preact.config.js:

import asyncPlugin from 'preact-cli-plugin-fast-async';

export default (config) => {
    asyncPlugin(config);
}

License

MIT
Original work © developit
Modified work © Daniel Ciao