esbuild-wrapper
is a small config based wrapper for esbuild
This package is not well tested, and may not work as expected, use at your own risk, the package was tested on Windows and Linux, but may not work on other platforms
-
Install the package
npm install -D @energypatrikhu/esbuild-wrapper
-
Add the following scripts to your
package.json
{ "scripts": { "build": "esbuild-wrapper" } }
-
Start the script
this creates an example configuration file, that later can be modified to your needs
npm run build
-
After that is done, you have to start
esbuild-wrapper
againnow the script minifies and bundles the script to the desired location
npm run build
-
inputFiles
: the files to bundle -
outDir
: the directory to output the bundled files -
options
: the options for esbuild-
platform
: the platform to bundle the script for (esbuild platform) -
minify
: whether to minify the script or not (esbuild minify) -
format
: the format of the output (esbuild format) -
logLevel
: the log level to use (esbuild logLevel) -
treeShaking
: whether to tree shake the output or not (esbuild tree shaking)
-