You should be able to achieve this too with just rollup-plugin-terser
. It bases on terser so more information it's actually available on its README, here is the part related to minification. So in your case this part of rollup.config.js
should looks like:
plugins: [
terser({
// remove all comments
format: {
comments: false
},
// prevent any compression
compress: false
}),
],
Keep in mind, that you can also enable part of configuration for production only. So having declared production
const in your rollup.config.js
you can do like that:
import { terser } from 'rollup-plugin-terser';
const production = !process.env.ROLLUP_WATCH;
export default {
plugins: [
production && terser({
// terser plugin config here
}),
],
};