MCPcopy
hub / github.com/rdev/liquid-glass-react / createBuildConfig

Function createBuildConfig

esbuild.config.js:4–26  ·  view source on GitHub ↗
(format)

Source from the content-addressed store, hash-verified

2const path = require('path');
3
4const createBuildConfig = (format) => ({
5 entryPoints: ['src/index.ts'],
6 bundle: true,
7 format,
8 outfile: format === 'esm' ? 'dist/index.esm.js' : 'dist/index.js',
9 external: ['react', 'react-dom'],
10 target: ['es2020'],
11 jsx: 'automatic',
12 jsxImportSource: 'react',
13 minify: process.env.NODE_ENV === 'production',
14 sourcemap: true,
15 platform: 'browser',
16 splitting: false,
17 loader: {
18 '.tsx': 'tsx',
19 '.ts': 'ts',
20 '.js': 'js',
21 '.jsx': 'jsx'
22 },
23 define: {
24 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
25 }
26});
27
28const buildAll = async () => {
29 try {

Callers 2

buildAllFunction · 0.85
watchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected