How can we build a bundle.min.js using the rollup plugin to be ready for production?
You would also use a minifier plugin such as rollup-plugin-uglify:
// rollup.config.js
import svelte from 'rollup-plugin-svelte';
import uglify from 'rollup-plugin-uglify';
export default {
entry: 'src/index.js',
dest: 'bundle.min.js',
format: 'iife',
plugins: [
svelte(),
uglify()
]
};
Most helpful comment
You would also use a minifier plugin such as rollup-plugin-uglify: