Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import typescript from 'rollup-plugin-typescript2';
import { terser } from 'rollup-plugin-terser';
import { generateHeader } from "vis-dev-utils";
import assets from 'postcss-assets';
import postcss from 'rollup-plugin-postcss';
// TypeScript because Babel transpiles modules in isolation, therefore no type reexports.
// CommonJS because Babel is not 100 % ESM.
const banner = generateHeader();
const plugins = {
nodeResolve: nodeResolve({
extensions: ['.ts', '.js', '.json']
}),
typescript: typescript({
tsconfig: 'tsconfig.code.json'
}),
commonjs: commonjs({
namedExports: {
'timsort': ['sort']
}
}),
babel: babel({
extensions: ['.ts', '.js'],
runtimeHelpers: true
import assets from "postcss-assets";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import copy from "rollup-plugin-copy";
import { generateHeader } from "vis-dev-utils";
import nodeResolve from "rollup-plugin-node-resolve";
import packageJSON from "./package.json";
import postcss from "rollup-plugin-postcss";
import typescript from "rollup-plugin-typescript2";
import { readFileSync } from "fs";
import { terser } from "rollup-plugin-terser";
const babelrc = JSON.parse(readFileSync("./.babelrc"));
const banner = generateHeader();
export default [].concat.apply(
[],
[
{
external: {},
globals: {},
injectCSS: true,
input: "lib/index-standalone.ts",
variant: "standalone"
},
{
external: Object.keys(packageJSON.peerDependencies),
globals: {
keycharm: "keycharm",
moment: "moment",