2018-09-07 17:07:13 +02: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.
|
|
|
|
|
2022-09-21 13:28:42 +02:00
|
|
|
import typescript from "rollup-plugin-typescript2";
|
|
|
|
import node from "rollup-plugin-node-resolve";
|
|
|
|
import path from "path";
|
2018-09-07 17:07:13 +02:00
|
|
|
|
2022-09-21 13:28:42 +02:00
|
|
|
const warningHandler = (warning) => {
|
2019-03-12 09:01:49 +01:00
|
|
|
// Silence circular dependency warning for moment package
|
|
|
|
const node_modules = path.normalize('node_modules/');
|
2025-04-29 08:03:15 +02:00
|
|
|
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.ids.some(id => id.indexOf(node_modules) !== -1)) {
|
2022-09-21 13:28:42 +02:00
|
|
|
return;
|
2019-03-12 09:01:49 +01:00
|
|
|
}
|
|
|
|
console.warn(`(!) ${warning.message}`)
|
|
|
|
}
|
|
|
|
|
2018-09-07 17:07:13 +02:00
|
|
|
export default {
|
2018-12-04 08:20:37 +01:00
|
|
|
input: "src/turbo-visualizer.ts",
|
2019-03-12 09:01:49 +01:00
|
|
|
plugins: [node(), typescript({
|
|
|
|
abortOnError: false
|
|
|
|
})],
|
|
|
|
output: {
|
|
|
|
file: "build/turbolizer.js",
|
|
|
|
format: "iife",
|
|
|
|
sourcemap: true
|
|
|
|
},
|
2022-09-21 13:28:42 +02:00
|
|
|
onwarn: warningHandler
|
2018-09-07 17:07:13 +02:00
|
|
|
};
|