forked from inrupt/solid-client-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
56 lines (53 loc) · 1.25 KB
/
rollup.config.mjs
File metadata and controls
56 lines (53 loc) · 1.25 KB
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
47
48
49
50
51
52
53
54
55
56
// The following is only possible from Node 18 onwards
// import pkg from "./package.json" assert { type: "json" };
// Until we only support Node 18+, this should be used instead
// (see https://rollupjs.org/guide/en/#importing-packagejson)
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const pkg = require('./package.json');
import typescript from "rollup-plugin-typescript2";
export default {
input: "./src/index.ts",
output: [
{
file: pkg.main,
format: "cjs",
},
{
file: pkg.module,
entryFileNames: "[name].es.js",
format: "esm",
},
{
dir: "dist",
entryFileNames: "[name].mjs",
format: "esm",
preserveModules: true,
},
{
dir: "umd",
format: "umd",
name: "SolidClient",
},
],
plugins: [
typescript({
// Use our own version of TypeScript, rather than the one bundled with the plugin:
typescript: require("typescript"),
tsconfigOverride: {
// Exclude tests:
exclude: ["**/*.test.ts"],
compilerOptions: {
module: "esnext",
},
},
}),
],
external: [
"cross-fetch",
"http-link-header",
"@rdfjs/dataset",
"n3",
"jsonld",
],
};