mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
Updated components build.
This commit is contained in:
parent
5f27ba149b
commit
56af91950a
53 changed files with 942 additions and 333 deletions
36
esbuild.mjs
Normal file
36
esbuild.mjs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import esbuild from 'esbuild';
|
||||
import { commonjs } from '@hyrious/esbuild-plugin-commonjs';
|
||||
import fs from 'node:fs';
|
||||
|
||||
fs.copyFileSync('./package.components.json', './dist/package.json');
|
||||
|
||||
esbuild
|
||||
.build({
|
||||
entryPoints: ['src/index.client.ts'],
|
||||
outfile: 'dist/client/index.js',
|
||||
platform: 'browser',
|
||||
bundle: true,
|
||||
jsx: 'automatic',
|
||||
format: 'esm',
|
||||
plugins: [commonjs()],
|
||||
external: ['react', 'react-dom', 'react-jsx/runtime', '@swc/helpers'],
|
||||
})
|
||||
.catch(e => {
|
||||
// eslint-disable-next-line
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
esbuild
|
||||
.build({
|
||||
entryPoints: ['src/index.server.ts'],
|
||||
outfile: 'dist/server/index.js',
|
||||
platform: 'node',
|
||||
bundle: true,
|
||||
format: 'esm',
|
||||
})
|
||||
.catch(e => {
|
||||
// eslint-disable-next-line
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue