+/* eslint-disable n/no-unpublished-import */
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
export default {
input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
+ strictDeprecations: true,
output: [
{
dir: 'dist',
entryFileNames: '[name].mjs',
...(!isDevelopmentBuild && { plugins: [terser({ maxWorkers: 2 })] }),
},
- {
- dir: 'dist',
- format: 'cjs',
- exports: 'auto',
- sourcemap: true,
- preserveModules: true,
- preserveModulesRoot: 'src',
- entryFileNames: '[name].cjs',
- ...(!isDevelopmentBuild && { plugins: [terser({ maxWorkers: 2 })] }),
- },
],
external: [
'@mikro-orm/core',
'http-status-codes',
'just-clone',
'just-merge',
- 'mnemonist/lru-map-with-delete',
+ 'mnemonist/lru-map-with-delete.js',
'moment',
'mongodb',
'node:async_hooks',
'tar',
'winston',
'winston-daily-rotate-file',
- 'winston/lib/winston/transports',
+ 'winston/lib/winston/transports/index.js',
'ws',
],
plugins: [
json(),
typescript({
- tsconfig: 'tsconfig.json',
+ tsconfig: 'tsconfig-base.json',
}),
del({
targets: [
'dist/*',
'!dist/assets',
'dist/assets/*.json',
- 'dist/assets/station-templates',
'dist/assets/json-schemas',
+ 'dist/assets/station-templates',
+ 'dist/assets/ui-protocol',
],
}),
copy({