Runs esbuild in grunt.
This task directly sends the provided config to the build function of esbuild (which you must provide).
$ npm install --save-dev esbuild grunt-esbuild
require('load-grunt-tasks')(grunt);
grunt.initConfig({
esbuild: {
options: {
buildFunction: require('esbuild').build
},
dist: {
entryPoints: ['src/main.js'],
bundle: true,
outfile: 'dist/main.js',
}
}
});
grunt.registerTask('default', ['esbuild']);