-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
37 lines (32 loc) · 972 Bytes
/
rollup.config.js
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
import typescript from "rollup-plugin-typescript2";
import babel from "@rollup/plugin-babel";
import pkg from "./package.json";
export default {
input: "src/index.tsx",
output: [
{ file: pkg.main, format: "cjs", exports: "named", sourcemap: true },
{ file: pkg.module, format: "es", sourcemap: true },
],
plugins: [
typescript({
typescript: require("typescript"),
clean: true,
tsconfig: "./tsconfig.json",
tsconfigOverride: {
exclude: ["node_modules/**", "**/*.d.spec.ts", "**/*.spec.ts"],
},
}),
babel({
babelHelpers: "runtime",
extensions: [".ts", ".tsx"],
exclude: ["node_modules/**", /\.spec\./],
presets: ["solid"],
plugins: [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
],
}),
],
external: [/@babel\/runtime/, /solid-js/, /^router5/],
};