taskr-esbuild

raw JSON →
1.0.6 verified Fri May 01 auth: no javascript maintenance

Esbuild plugin for Taskr, a tiny build tool. Current stable version is 1.0.6 with no active development (last release in 2020). It allows using esbuild as a Taskr plugin, supporting Vue 3, React, and Preact, with basic CSS/Sass/Less/Stylus imports and image/JSON imports. Differentiator: part of the minimal Taskr ecosystem (7MB node_modules), but esbuild has since evolved and the plugin may lag behind. No known release cadence.

error Error: Cannot find module 'taskr-esbuild'
cause Package not installed or peer dependencies missing.
fix
Install package and its peers: npm install --save-dev taskr-esbuild taskr esbuild
error TypeError: task.source(...).esbuild is not a function
cause Plugin not registered or wrong version of Taskr.
fix
Ensure you have a taskr.config.js that exports a function (or use taskfile.js) and that the plugin is installed correctly.
breaking Node.js >= 10.0 required due to reliance on older Taskr version.
fix Upgrade Node.js to >=10.0.
gotcha Plugin is not actively maintained; last updated in 2020. May not work with latest esbuild versions.
fix Pin esbuild to a compatible version (e.g., around 0.9.x) if using this plugin.
gotcha Does not support .vue single-file components; only supports JavaScript JSX with Vue 3.
fix Use a separate Vue plugin for .vue files.
deprecated Taskr itself is in maintenance mode; consider switching to modern build tools.
fix Migrate to esbuild directly or use esbuild with other task runners.
npm install taskr-esbuild
yarn add taskr-esbuild
pnpm add taskr-esbuild

Shows how to define a Taskr task that uses the esbuild plugin to transpile JavaScript files.

// taskfile.js
module.exports = function (task) {
  task('esbuild', function * () {
    yield task.source('src/**/*.js').esbuild().target('dist/js');
  });
};