mercury-parser/rollup.config.web.js

34 lines
792 B
JavaScript
Raw Normal View History

import nodeResolve from 'rollup-plugin-node-resolve';
import globals from 'rollup-plugin-node-globals';
2019-01-23 17:54:42 +00:00
import { uglify } from 'rollup-plugin-uglify'; // eslint-disable-line import/extensions
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
export default {
2019-01-23 17:54:42 +00:00
input: 'src/mercury.js',
plugins: [
2019-01-23 17:54:42 +00:00
babel({
runtimeHelpers: true,
exclude: './node_modules#<{(|*',
}),
commonjs({
ignoreGlobal: true,
}),
globals(),
nodeResolve({
browser: true,
preferBuiltins: false,
}),
uglify(),
],
2019-01-23 17:54:42 +00:00
treeshake: true,
output: {
file: process.env.MERCURY_TEST_BUILD
? 'dist/mercury_test.web.js'
: 'dist/mercury.web.js',
format: 'iife',
name: 'Mercury',
sourceMap: true,
},
};