import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';

export default {
  output: {name: 'perfetto'},
  plugins: [
    nodeResolve({mainFields: ['browser', 'main']}),

    // emscripten conditionally executes require('fs') (likewise for others),
    // when running under node. Rollup can't find those libraries so expects
    // these to be present in the global scope, which then fails at runtime.
    // To avoid this we ignore require('fs') and the like.
    commonjs({
      ignore: [
        'fs',
        'path',
        'crypto',
      ]
    }),
  ]
}

import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';

export default {
  output: {name: 'perfetto'},
  plugins: [
    nodeResolve({module: false, browser: true}),

    // emscripten conditionally executes require('fs') (likewise for others),
    // when running under node. Rollup can't find those libraries so expects
    // these to be present in the global scope, which then fails at runtime.
    // To avoid this we ignore require('fs') and the like.
    commonjs({
      ignore: [
        'fs',
        'path',
        'crypto',
      ]
    }),
  ]
}

Revert "perfetto-ui: Fix deprecated warning"
Revert "perfetto-ui: Fix deprecated warning"

This reverts commit f59bbaae2522e01308f59046c8577999283c281a.

Reason for revert: Breaks ui build.

Change-Id: I9a5b10a1ebb448bf472d27f5d985248c750e157c
