forked from gbtami/pychess-variants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.prod.js
34 lines (33 loc) · 1.12 KB
/
rollup.config.prod.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
import nodeResolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import brotli from 'rollup-plugin-brotli';
import zlib from 'zlib';
const postcss = require('rollup-plugin-postcss')
export default {
input: "client/main.ts",
output: {
name: "PychessVariants",
file: "static/pychess-variants.js",
format: "iife",
},
plugins: [
nodeResolve(),
postcss({
config: false, // don't attempt to load a postcss config
// extract: true
// ^^^ for writing CSS to a separate file (dist/main.css).
// in rollup v2, this writes CSS rules in wrong order (https://github.com/egoist/rollup-plugin-postcss/issues/96)
// so, disable for now, and allow the CSS to be embedded in the JS
}),
commonjs(),
typescript(),
terser(),
brotli({
params: {
[zlib.constants.BROTLI_PARAM_QUALITY]: zlib.constants.BROTLI_MAX_QUALITY,
},
}),
],
}