Skip to content

Instantly share code, notes, and snippets.

@robwormald
Created February 11, 2020 01:21
Show Gist options
  • Save robwormald/8bc8e7f3e315a51707b92a9b98b48feb to your computer and use it in GitHub Desktop.
Save robwormald/8bc8e7f3e315a51707b92a9b98b48feb to your computer and use it in GitHub Desktop.
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