mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Updated components build.
This commit is contained in:
parent
5f27ba149b
commit
56af91950a
53 changed files with 942 additions and 333 deletions
|
|
@ -8,7 +8,6 @@ import copy from 'rollup-plugin-copy';
|
|||
import del from 'rollup-plugin-delete';
|
||||
import nodeExternals from 'rollup-plugin-node-externals';
|
||||
import esbuild from 'rollup-plugin-esbuild';
|
||||
import dts from 'rollup-plugin-dts';
|
||||
|
||||
const md5 = str => crypto.createHash('md5').update(str).digest('hex');
|
||||
|
||||
|
|
@ -24,11 +23,11 @@ const aliasConfig = {
|
|||
customResolver,
|
||||
};
|
||||
|
||||
const jsBundle = {
|
||||
input: 'src/index.ts',
|
||||
const clientConfig = {
|
||||
input: 'src/index.client.ts',
|
||||
output: [
|
||||
{
|
||||
file: 'dist/index.js',
|
||||
file: 'dist/client/index.js',
|
||||
format: 'es',
|
||||
sourcemap: true,
|
||||
},
|
||||
|
|
@ -52,9 +51,9 @@ const jsBundle = {
|
|||
},
|
||||
},
|
||||
}),
|
||||
alias(aliasConfig),
|
||||
nodeExternals(),
|
||||
json(),
|
||||
alias(aliasConfig),
|
||||
esbuild({
|
||||
target: 'es6',
|
||||
jsx: 'automatic',
|
||||
|
|
@ -65,14 +64,14 @@ const jsBundle = {
|
|||
],
|
||||
};
|
||||
|
||||
const dtsBundle = {
|
||||
input: 'src/index.ts',
|
||||
const serverConfig = {
|
||||
input: 'src/index.server.ts',
|
||||
output: {
|
||||
file: 'dist/index.d.ts',
|
||||
file: 'dist/server/index.ts',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [alias(aliasConfig), nodeExternals(), json(), dts()],
|
||||
plugins: [alias(aliasConfig), nodeExternals(), json()],
|
||||
external: [/\.css/],
|
||||
};
|
||||
|
||||
export default [jsBundle, dtsBundle];
|
||||
export default [clientConfig, serverConfig];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue