-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtsdx.config.js
30 lines (29 loc) · 885 Bytes
/
tsdx.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
const replace = require('@rollup/plugin-replace');
const postcss = require('rollup-plugin-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
module.exports = {
rollup(config, options) {
config.plugins = config.plugins.map(p =>
p.name === 'replace'
? replace({
'process.env.NODE_ENV': JSON.stringify(options.env),
preventAssignment: true,
})
: p
);
config.plugins.push(
postcss({
plugins: [
autoprefixer(),
cssnano({
preset: 'default',
}),
],
inject: false,
extract: 'cursor-chat.min.css',
})
);
return config;
},
};