father
father copied to clipboard
打包的时候能去掉console.log和comments吗?
.fatherrc.js
import terser from 'rollup-plugin-terser';
export default {
esm: 'rollup',
extraRollupPlugins: [
terser({
compress: {
pure_funcs: ['console.log'], // 去除console.log
drop_debugger: true, // 去掉debugger
output: { comments: true }, // 去除注释
},
}),
],
};
"rollup-plugin-terser": "^7.0.2" [email protected]
未生效
.fatherrc.js
import terser from 'rollup-plugin-terser'; export default { esm: 'rollup', extraRollupPlugins: [ terser({ compress: { pure_funcs: ['console.log'], // 去除console.log drop_debugger: true, // 去掉debugger output: { comments: true }, // 去除注释 }, }), ], };"rollup-plugin-terser": "^7.0.2" [email protected]
未生效
搞错了,不是这个库,是https://github.com/umijs/father-next
I got the same question, anyone to help to fix this problem? thks very much
Duplicate of #503
你用的 father 4 但配置还是 father 2 的,需要参考 father 4 的文档更新