Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import node from 'rollup-plugin-node-resolve'
import buildOptimizer from '@angular-devkit/build-optimizer/src/build-optimizer/rollup-plugin'
import terser from 'rollup-plugin-terser'
export default {
input: {
app: './lib/app.js'
},
output: {
dir: 'public'
},
plugins: [
node({
mainFields: ['browser', 'es2015', 'module', 'jsnext:main', 'main']
}),
buildOptimizer({
sideEffectFreeModules: []
}),
terser.terser({
compress: {
passes: 3,
pure_getters: true,
global_defs: {
ngDevMode: false,
},
},
mangle: true
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment