Nominally Patriotic Meathead

    piral-cli-esbuild
    TypeScript icon, indicating that this package has built-in type declarations

    0.14.25 • Public • Published

    Piral Logo

    Piral CLI esbuild · GitHub License npm version tested with jest Gitter Chat

    This plugin enables using esbuild as the bundler for Piral instances and pilets.

    Installation

    Use your favorite NPM client for the installation:

    npm i piral-cli-esbuild --save-dev

    Note: The plugin has to be installed to tell the piral-cli to use esbuild as the default bundler.

    Using

    There is nothing to do. Standard commands such as piral build or pilet debug will now work with esbuild as the bundler.

    This plugin comes with batteries included. You don't need to install or specify your esbuild version.

    What's Inside

    Right now it includes:

    • esbuild-sass-plugin

    Customizing

    If you want to customize the given config (e.g., to add more plugins) then create a file esbuild.config.js in your root directory.

    In the most trivial version the file looks as follows:

    module.exports = function(options) {
      return options;
    };

    This would just receive the original build options and return them, i.e., essentially not doing anything. If you want to add some plugin you could do:

    const { somePlugin } = require('esbuild-some-plugin');
    
    module.exports = function(options) {
      options.plugins.push(somePlugin());
      return options;
    };

    There are no overrides applied afterwards. Therefore, what you modify will remain in the options.

    License

    Piral is released using the MIT license. For more information see the license file.

    Install

    npm i piral-cli-esbuild

    Homepage

    piral.io

    DownloadsWeekly Downloads

    12,251

    Version

    0.14.25

    License

    MIT

    Unpacked Size

    73 kB

    Total Files

    60

    Last publish

    Collaborators

    • florianrappl