1// Copyright 2018 the V8 project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5import typescript from 'rollup-plugin-typescript2'; 6import node from 'rollup-plugin-node-resolve'; 7 8import path from 'path' 9 10const onwarn = warning => { 11 // Silence circular dependency warning for moment package 12 const node_modules = path.normalize('node_modules/'); 13 if (warning.code === 'CIRCULAR_DEPENDENCY' && 14 !warning.importer.indexOf(node_modules)) { 15 return 16 } 17 18 console.warn(`(!) ${warning.message}`) 19} 20 21export default { 22 input: "src/turbo-visualizer.ts", 23 plugins: [node(), typescript({ 24 abortOnError: false 25 })], 26 output: { 27 file: "build/turbolizer.js", 28 format: "iife", 29 sourcemap: true 30 }, 31 onwarn: onwarn 32}; 33