mirror of
https://github.com/postlight/mercury-parser
synced 2024-10-31 03:20:40 +00:00
34 lines
792 B
JavaScript
34 lines
792 B
JavaScript
import nodeResolve from 'rollup-plugin-node-resolve';
|
|
import globals from 'rollup-plugin-node-globals';
|
|
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 {
|
|
input: 'src/mercury.js',
|
|
plugins: [
|
|
babel({
|
|
runtimeHelpers: true,
|
|
exclude: './node_modules#<{(|*',
|
|
}),
|
|
commonjs({
|
|
ignoreGlobal: true,
|
|
}),
|
|
globals(),
|
|
nodeResolve({
|
|
browser: true,
|
|
preferBuiltins: false,
|
|
}),
|
|
uglify(),
|
|
],
|
|
treeshake: true,
|
|
output: {
|
|
file: process.env.MERCURY_TEST_BUILD
|
|
? 'dist/mercury_test.web.js'
|
|
: 'dist/mercury.web.js',
|
|
format: 'iife',
|
|
name: 'Mercury',
|
|
sourceMap: true,
|
|
},
|
|
};
|