mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
init: the first public commit for AFFiNE
This commit is contained in:
32
libs/rollup.config.cjs
Normal file
32
libs/rollup.config.cjs
Normal file
@@ -0,0 +1,32 @@
|
||||
const nrwlConfig = require('@nrwl/react/plugins/bundle-rollup');
|
||||
const style9 = require('style9/rollup');
|
||||
|
||||
module.exports = config => {
|
||||
const nxConfig = nrwlConfig(config);
|
||||
const padding = [];
|
||||
|
||||
const postcssIndex = nxConfig.plugins.findIndex(p => p?.name === 'postcss');
|
||||
if (postcssIndex !== -1) {
|
||||
const postcss = nxConfig.plugins[postcssIndex];
|
||||
|
||||
padding.push(postcss);
|
||||
nxConfig.plugins.splice(postcssIndex, 1);
|
||||
|
||||
const style9Plugin = style9({
|
||||
minifyProperties: true,
|
||||
incrementalClassnames: true,
|
||||
});
|
||||
padding.push(style9Plugin);
|
||||
|
||||
const rpt2Index = nxConfig.plugins.findIndex(p => p?.name === 'rpt2');
|
||||
if (rpt2Index !== -1) {
|
||||
// padding.push(nxConfig.plugins[rpt2Index]);
|
||||
nxConfig.plugins.splice(rpt2Index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
...nxConfig,
|
||||
plugins: [...padding, ...nxConfig.plugins].filter(v => v),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user