-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathtsdx.config.js
More file actions
30 lines (29 loc) · 773 Bytes
/
tsdx.config.js
File metadata and controls
30 lines (29 loc) · 773 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
28
29
30
const postcss = require("rollup-plugin-postcss");
const url = require('@rollup/plugin-url')
const svgr = require('@svgr/rollup').default;
module.exports = {
rollup(config, options) {
config.plugins.push(
postcss({
minimize: true,
})
);
config.plugins = [
svgr({
// configure however you like, this is just an example
ref: true,
memo: true,
svgoConfig: {
plugins: [
{ removeViewBox: false },
{ removeAttrs: { attrs: 'g:(stroke|fill):((?!^none$).)*' } }
],
},
}),
// Force the `url` plugin to emit files.
url({ include: ['**/*.ttf', '**/*.woff', '**/*.eot', '**/*.svg'] }),
...config.plugins,
]
return config;
},
};