2018-07-11 06:38:37 +00:00
|
|
|
// 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';
|
2018-07-11 06:39:35 +00:00
|
|
|
import node from 'rollup-plugin-node-resolve';
|
2018-07-11 06:38:37 +00:00
|
|
|
|
2018-12-20 12:59:27 +00:00
|
|
|
import path from 'path'
|
|
|
|
|
|
|
|
const onwarn = warning => {
|
|
|
|
// Silence circular dependency warning for moment package
|
|
|
|
const node_modules = path.normalize('node_modules/');
|
2019-01-04 14:09:17 +00:00
|
|
|
if (warning.code === 'CIRCULAR_DEPENDENCY' &&
|
|
|
|
!warning.importer.indexOf(node_modules)) {
|
2018-12-20 12:59:27 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
console.warn(`(!) ${warning.message}`)
|
|
|
|
}
|
|
|
|
|
2018-07-11 06:38:37 +00:00
|
|
|
export default {
|
2018-09-17 11:49:18 +00:00
|
|
|
input: "src/turbo-visualizer.ts",
|
2019-01-04 14:09:17 +00:00
|
|
|
plugins: [node(), typescript({
|
|
|
|
abortOnError: false
|
|
|
|
})],
|
|
|
|
output: {
|
|
|
|
file: "build/turbolizer.js",
|
|
|
|
format: "iife",
|
|
|
|
sourcemap: true
|
|
|
|
},
|
2018-12-20 12:59:27 +00:00
|
|
|
onwarn: onwarn
|
2018-07-11 06:38:37 +00:00
|
|
|
};
|