-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtsup.config.ts
More file actions
27 lines (25 loc) · 841 Bytes
/
tsup.config.ts
File metadata and controls
27 lines (25 loc) · 841 Bytes
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
import { defineConfig } from 'tsup';
/**
* Clean output folder
* Build esm version (for: import WebReader from "@nypl/web-reader")
* Build cjs version (for: const WebReader = require("@nypl/web-reader"))
* Compile injectable CSS files (is this used?)
* Generate TS declarations
*/
export default defineConfig({
entry: {
index: 'src/index.tsx',
'injectable-html-styles/ReadiumCSS-before':
'src/HtmlReader/ReadiumCss/ReadiumCSS-before.css',
'injectable-html-styles/ReadiumCSS-default':
'src/HtmlReader/ReadiumCss/ReadiumCSS-default.css',
'injectable-html-styles/ReadiumCSS-after':
'src/HtmlReader/ReadiumCss/ReadiumCSS-after.css',
},
format: ['esm', 'cjs'],
sourcemap: true,
dts: true,
target: ['es2016', 'chrome89', 'firefox88', 'safari14', 'edge90'],
clean: true,
minify: false,
});