0.4.0 • Published 5 months ago

esbuild-plugin-define v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

esbuild-plugin-define

Build Status

Install

npm install esbuild-plugin-define -D

Usage

Add the plugin to your esbuild plugins.

Example esbuild.config.cjs file:

const { definePlugin } = require('esbuild-plugin-define');

module.exports = () => {
  const config = {
    bundle: true,
    sourcemap: true,
    platform: 'node',
    target: 'es2022',
    format: 'esm',
    outputFileExtension: '.mjs',
    define: {},
    concurrency: 4,
    watch: {
      pattern: ['./src/**'],
      ignore: ['dist', 'node_modules'],
    },
    plugins: [
      definePlugin({
        process: {
          env: {
            BUILD_TIMESTAMP: new Date().toISOString(),
          },
        },
      }),
    ],
  };

  return config;
};
0.4.0

5 months ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.0

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago