forked from valqelyan/svelte-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
27 lines (25 loc) · 750 Bytes
/
rollup.config.js
File metadata and controls
27 lines (25 loc) · 750 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 svelte from "rollup-plugin-svelte";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import pkg from "./package.json";
const name = pkg.name
.replace(/^(@\S+\/)?(svelte-)?(\S+)/, "$3")
.replace(/^\w/, (m) => m.toUpperCase())
.replace(/-\w/g, (m) => m[1].toUpperCase());
export default [
{
input: "src/index.svelte",
output: [
{ file: pkg.module, format: "es" },
{ file: pkg.main, format: "umd", name },
],
plugins: [svelte(), resolve(), commonjs()],
},
{
input: "./src/utils/helper.js",
output: [
{ file: "build/helper/index.mjs", format: "es" },
{ file: "build/helper/index.js", format: "umd", name: "gridHelper" },
],
},
];