Skip to content
Snippets Groups Projects
rollup.config.js 879 B
Newer Older
Alexander Rose's avatar
Alexander Rose committed
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

var path = require('path');
var pkg = require('./package.json');
var external = Object.keys(pkg.dependencies);

export default {
  input: 'build/js/src/index.js',
  plugins: [
    resolve({
      jsnext: true,
      main: true
    }),
    commonjs(),
    json(),
Alexander Rose's avatar
Alexander Rose committed
  ],
  output: [
    {
      file: "build/js/molio.dev.js",
      format: 'umd',
      name: 'MOLIO',
    // {
    //   file: "build/js/molio.esm.js",
    //   format: 'es',
    //   sourcemap: false
    // }
Alexander Rose's avatar
Alexander Rose committed
  ],
  external: external,
David Sehnal's avatar
David Sehnal committed
  sourcemap: false,
  onwarn(warning, warn) {
    if (warning.code === 'THIS_IS_UNDEFINED') return;
    warn(warning); // this requires Rollup 0.46
  }