generated from githubnext/blocks-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.mjs
32 lines (31 loc) · 929 Bytes
/
rollup.config.mjs
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
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import postcss from "rollup-plugin-postcss";
export default [
{
input: 'blocks/data-file-block/index.tsx',
output: {
file: 'dist/data-file-block/index.js',
format: 'iife',
name: "BlockBundle"
},
external: ["fs", "path", "assert", "react", "react-dom", "@primer/react"],
plugins: [
typescript({
compilerOptions: {
lib: ["es2020"],
target: "es2020",
jsx: "react"
}
}),
nodeResolve(),
commonjs(),
postcss({
extract: true,
extensions: [".css"],
minimize: true
})
]
}
];