repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf: use O(1) queue implementation in async locking code
[e-mobility-charging-stations-simulator.git]
/
rollup.config.mjs
diff --git
a/rollup.config.mjs
b/rollup.config.mjs
index 1e9c26b879efc49e5896f5277f3b6f90f9ef29d5..be507238e8268c58c3e898f47c69a49e033d8b3b 100644
(file)
--- a/
rollup.config.mjs
+++ b/
rollup.config.mjs
@@
-1,12
+1,15
@@
/* eslint-disable n/no-unpublished-import */
/* eslint-disable n/no-unpublished-import */
+import { cpus } from 'node:os';
+
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
+import { copy } from '@web/rollup-plugin-copy';
import analyze from 'rollup-plugin-analyzer';
import analyze from 'rollup-plugin-analyzer';
-import copy from 'rollup-plugin-copy';
import del from 'rollup-plugin-delete';
const isDevelopmentBuild = process.env.BUILD === 'development';
import del from 'rollup-plugin-delete';
const isDevelopmentBuild = process.env.BUILD === 'development';
+const isAnalyzeBuild = process.env.ANALYZE;
export default {
input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
export default {
input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
@@
-15,12
+18,8
@@
export default {
{
dir: 'dist',
format: 'esm',
{
dir: 'dist',
format: 'esm',
- exports: 'auto',
- sourcemap: true,
- preserveModules: true,
- preserveModulesRoot: 'src',
- entryFileNames: '[name].mjs',
- ...(!isDevelopmentBuild && { plugins: [terser({ maxWorkers: 2 })] }),
+ sourcemap: !!isDevelopmentBuild,
+ plugins: [terser({ maxWorkers: cpus().length / 2 })],
},
],
external: [
},
],
external: [
@@
-38,6
+37,7
@@
export default {
'mongodb',
'node:async_hooks',
'node:crypto',
'mongodb',
'node:async_hooks',
'node:crypto',
+ 'node:events',
'node:fs',
'node:http',
'node:path',
'node:fs',
'node:http',
'node:path',
@@
-47,7
+47,6
@@
export default {
'node:util',
'node:worker_threads',
'poolifier',
'node:util',
'node:worker_threads',
'poolifier',
- 'proper-lockfile',
'tar',
'winston',
'winston-daily-rotate-file',
'tar',
'winston',
'winston-daily-rotate-file',
@@
-57,7
+56,10
@@
export default {
plugins: [
json(),
typescript({
plugins: [
json(),
typescript({
- tsconfig: 'tsconfig-base.json',
+ tsconfig: 'tsconfig.json',
+ compilerOptions: {
+ sourceMap: !!isDevelopmentBuild,
+ },
}),
del({
targets: [
}),
del({
targets: [
@@
-70,8
+72,16
@@
export default {
],
}),
copy({
],
}),
copy({
- targets: [{ src: 'src/assets', dest: 'dist/' }],
+ rootDir: 'src',
+ patterns: 'assets/**/*.json',
+ exclude: [
+ 'assets/config-template.json',
+ 'assets/*config[-_.]*.json',
+ 'assets/idtags-template.json',
+ 'assets/authorization-tags-template.json',
+ 'assets/ui-protocol/**/*',
+ ],
}),
}),
- is
Development
Build && analyze(),
+ is
Analyze
Build && analyze(),
],
};
],
};