@shelf/esbuild-config

0.2.0 • Public • Published

@shelf/esbuild-config

A collection of configurations and utilities to help you build projects or libraries using esbuild. This package includes plugins for common tasks like transpiling TypeScript and compiling SASS and styled-components, as well as presets for React.

Install

$ yarn add -D @shelf/esbuild-config

Usage

Once installed, you can use esbuild-config to configure and run your esbuild builds. The package provides two utility functions, common() and frontend(), that you can import and call from your build scripts:

// Import the function you need
import {common, frontend} from '@shelf/esbuild-config';

// Call the functions with your options
await common({
  entryPoints: ['src/index.ts'],
  target: ['esnext', 'node16'],
  // ...
});

await frontend({
  entryPoints: ['src/index.ts'],
  target: ['esnext', 'node16'],
  sassConfig: {
    // ...
  },
  // ...
});

Both functions accept a similar set of options that you can use to customize the build process according to your needs. Check the JSDoc comments in the code for more information on the available options.

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf

Package Sidebar

Install

npm i @shelf/esbuild-config

Weekly Downloads

83

Version

0.2.0

License

MIT

Unpacked Size

7.46 kB

Total Files

10

Last publish

Collaborators

  • ksenia_holovko
  • petro.bodnarchuk
  • kateryna-kochina
  • maksym.tarnavskyi
  • andrii-nastenko
  • mykhailo.yatsko
  • ahavrysh
  • nikita_shelf
  • maciej.orlowski
  • monopotan
  • andrew214
  • bogdan.kolesnyk
  • andrii.batutin
  • kristina.zhak
  • anton-russo
  • mmazurowski
  • toms-shelf
  • mateuszgajdashelf
  • kchlon
  • dmytro.harazdovskiy
  • duch0416
  • i5adovyi
  • olesiamuller
  • mykola.khytra
  • yuliiakovalchuk
  • el_scrambone
  • bodyaflesh
  • slavammellnikov
  • andriisermiahin
  • mpushkin
  • batovpavlo
  • domovoj
  • vozemer
  • oleksii.dymnich
  • dima-bond
  • maksym.hayovets
  • oles.zadorozhnyy
  • ss1l
  • gemshelf
  • hartzler
  • vladgolubev
  • hmelenok
  • knupman
  • maaraanas
  • terret
  • chapelskyi.slavik
  • pihorb
  • irynah
  • diana.kryskuv
  • andy.raven
  • rafler
  • sskalp88
  • demiansua
  • yuriil
  • ktv18
  • drews_abuse
  • rostyslav-horytskyi
  • whodeen