Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
filename.push('.min');
}
filename.push('.js');
// collect plugins
const plugins = [];
if (transpile) {
plugins.push(babel({
exclude: ['node_modules/**']
}));
}
if (minify) {
plugins.push(terser());
}
else {
plugins.push(prettier({
singleQuote: true,
parser: 'babel'
}));
}
plugins.push(license({banner: banner(options)}));
// return Rollup config
return {
input: 'src/js/index.js',
treeshake: false,
output: [
{
format,
name: id,
file: filename.join('')
}
filename.push('.min');
}
filename.push('.js');
// collect plugins
const plugins = [];
if (transpile) {
plugins.push(babel({
exclude: ['node_modules/**']
}))
}
if (minify) {
plugins.push(terser())
}
else {
plugins.push(prettier({
singleQuote: true,
parser: 'babel'
}))
}
plugins.push(license(createBanner(options)))
// return Rollup config
return {
input: 'src/js/index.js',
treeshake: false,
output: [
{
format,
name: id,
file: filename.join('')
}
name: 'ReactTreeGraph'
},
plugins: [
babel({
exclude: 'node_modules/**'
}),
clear({
targets: ['dist']
}),
progress()
]
};
const devConfig = clone(defaultConfig);
devConfig.output.file = 'dist/index.js';
devConfig.plugins.push(prettier({
singleQuote: true,
useTabs: true
}));
devConfig.plugins.unshift(postcss({
extract: 'dist/style.css'
}));
const prodConfig = clone(defaultConfig);
prodConfig.output.file = 'dist/index.min.js';
prodConfig.plugins.push(uglify());
prodConfig.plugins.unshift(postcss({
extract: 'dist/style.min.css',
minimize: true
}));
export default [
index: "src/main.js",
cargo: "node_modules/rust-native-wasm-loader/dist/cargo.js"
},
output: {
dir: dirname(pkg.main),
format: "cjs",
exports: "named"
},
experimentalCodeSplitting: true,
plugins: [
eslint(),
babel(),
commonjs(),
resolve(),
autoExternal(),
prettier(prettierrc.files("*.js"))
]
}
]
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import eslint from 'rollup-plugin-eslint';
import prettier from 'rollup-plugin-prettier';
import uglify from 'rollup-plugin-uglify';
import pkg from './package.json';
import babel from 'rollup-plugin-babel';
const prettierConfig = require('./.prettierrc');
const plugins = [
eslint(),
prettier(prettierConfig),
resolve({
module: true,
jsnext: true,
main: true,
browser: true,
preferBuiltins: false
}),
commonjs({
namedExports: {
'bellhop-iframe': ['Bellhop']
}
}),
babel(),
uglify()
];
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import eslint from 'rollup-plugin-eslint';
import prettier from 'rollup-plugin-prettier';
import uglify from 'rollup-plugin-uglify';
import babel from 'rollup-plugin-babel';
const prettierConfig = require('./.prettierrc');
const plugins = [
eslint(),
prettier(prettierConfig),
resolve({
module: true,
jsnext: true,
main: true,
browser: true,
preferBuiltins: false
}),
commonjs(),
babel(),
uglify()
];
export default [
{
input: 'src/index.js',
output: [