UNPKG

vue-xcrop

Version:

A simple mobile image cropper for Vue 1/2

50 lines (48 loc) 1.22 kB
// Rollup plugins import babel from 'rollup-plugin-babel' import resolve from 'rollup-plugin-node-resolve' import commonjs from 'rollup-plugin-commonjs' import uglify from 'rollup-plugin-uglify' import replace from 'rollup-plugin-replace' const packageJson = require('./package.json') const isDev = process.env.NODE_ENV !== 'production' export default { entry: 'src/main.js', banner: ` /*! * @name vue-xcrop v${packageJson.version} * @github https://github.com/ffx0s/vue-crop * @license MIT. */ `, dest: isDev ? 'dist/vuecrop.js' : 'dist/vuecrop.min.js', format: 'umd', moduleName: 'Crop', plugins: [ resolve({ jsnext: true, main: true, browser: true }), commonjs(), babel({ exclude: 'node_modules/**' }), replace({ exclude: 'node_modules/**', ENV: JSON.stringify(process.env.NODE_ENV || 'development') }), (!isDev && uglify({ output: { comments (node, comment) { const text = comment.value const type = comment.type if (type === 'comment2') { // multiline comment return /@name|@github|@license/i.test(text) } } } })) ] }