@app-config/esbuild
v2.9.0-beta.1
Published
esbuild module resolution support for @app-config
Downloads
47
Readme
App Config esbuild
Use app-config with esbuild.
Install:
yarn add -D @app-config/esbuild
Then add it to your esbuild configuration:
const { createPlugin: appConfig } = require('@app-config/esbuild');
require('esbuild')
.build({
bundle: true,
entryPoints: ['./src/index.ts'],
outfile: './dist/index.js',
// this is the line we care about
plugins: [appConfig()],
})
.catch(() => process.exit(1));
This will allow you to import @app-config/main
from your application, with all
filesystem and other Node.js code stripped out (when using bundle
).