2016-11-21 22:17:06 +00:00
|
|
|
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';
|
2016-11-21 22:17:06 +00:00
|
|
|
|
|
|
|
export default {
|
2019-01-23 17:54:42 +00:00
|
|
|
input: 'src/mercury.js',
|
2016-11-21 22:17:06 +00:00
|
|
|
plugins: [
|
2019-01-23 17:54:42 +00:00
|
|
|
babel({
|
|
|
|
runtimeHelpers: true,
|
|
|
|
exclude: './node_modules#<{(|*',
|
|
|
|
}),
|
2016-11-21 22:17:06 +00:00
|
|
|
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,
|
|
|
|
},
|
2016-11-21 22:17:06 +00:00
|
|
|
};
|