rollup.config.js 819 Bytes
Newer Older
1 2 3 4 5
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import typescript from 'rollup-plugin-typescript2';
6
import node from 'rollup-plugin-node-resolve';
7

8 9 10 11 12
import path from 'path'

const onwarn = warning => {
  // Silence circular dependency warning for moment package
  const node_modules = path.normalize('node_modules/');
13 14
  if (warning.code === 'CIRCULAR_DEPENDENCY' &&
    !warning.importer.indexOf(node_modules)) {
15 16 17 18 19 20
    return
  }

  console.warn(`(!) ${warning.message}`)
}

21
export default {
22
  input: "src/turbo-visualizer.ts",
23 24 25 26 27 28 29 30
  plugins: [node(), typescript({
    abortOnError: false
  })],
  output: {
    file: "build/turbolizer.js",
    format: "iife",
    sourcemap: true
  },
31
  onwarn: onwarn
32
};