forked from arthurdenner/react-semantic-ui-datepickers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsdx.config.js
34 lines (31 loc) · 794 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
31
32
33
34
const copy = require('rollup-plugin-copy');
const postcss = require('rollup-plugin-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
module.exports = {
rollup(config, options) {
config.plugins.push(
postcss({
plugins: [
autoprefixer(),
cssnano({
preset: 'default',
}),
],
inject: true,
// only write out CSS for the first bundle (avoids pointless extra files):
extract: options.writeMeta
? 'react-semantic-ui-datepickers.css'
: false,
})
);
if (options.writeMeta) {
config.plugins.push(
copy({
targets: [{ src: 'src/locales', dest: 'dist' }],
})
);
}
return config;
},
};