Created
February 11, 2020 01:21
-
-
Save robwormald/8bc8e7f3e315a51707b92a9b98b48feb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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