1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Description: replace rollup-plugin-ts
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2023-09-10
--- a/rollup.config.mjs
+++ b/rollup.config.mjs
@@ -1,25 +1,22 @@
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
-import terser from '@rollup/plugin-terser';
-import bundleSize from 'rollup-plugin-bundle-size';
-import ts from 'rollup-plugin-ts';
+import { terser } from 'rollup-plugin-terser';
+import typescript from '@rollup/plugin-typescript';
import pkg from './package.json' assert { type: 'json' };
-const plugins = (browserslist, declaration) => [
- resolve(),
- json(),
- ts({
- tsconfig: (resolvedConfig) => ({
- ...resolvedConfig,
- declaration,
- declarationMap: declaration
+const plugins = (browserslist, declaration) => {
+ let compilerOptions = { noEmit: false, declaration};
+ if (declaration) compilerOptions.declarationDir = './build';
+ return [
+ resolve(),
+ json(),
+ typescript({
+ compilerOptions,
+ exclude: [ '*/**/*.test.ts' ],
}),
- transpiler: "babel",
- browserslist
- }),
- bundleSize()
-];
+ ]
+};
const outputs = [
{
|