1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

formatting

This commit is contained in:
Kyle Spearrin
2018-01-06 10:23:16 -05:00
parent e314aa1651
commit a26fbbc6b1
2 changed files with 26 additions and 24 deletions

View File

@@ -5,30 +5,30 @@ import resolve from 'rollup-plugin-node-resolve';
import sourceMaps from 'rollup-plugin-sourcemaps';
const pkg = require('./package.json');
const libraryName = 'index';
export default {
input: `dist/es/${libraryName}.js`,
output: [
{ file: pkg.main, name: libraryName, format: 'umd' },
{ file: pkg.module, format: 'es' },
],
sourcemap: true,
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: [],
watch: {
include: 'dist/es/**',
},
plugins: [
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs(),
// Allow node_modules resolution, so you can use 'external' to control
// which external modules to include in the bundle
// https://github.com/rollup/rollup-plugin-node-resolve#usage
resolve(),
input: `dist/es/${libraryName}.js`,
output: [
{ file: pkg.main, name: libraryName, format: 'umd' },
{ file: pkg.module, format: 'es' },
],
sourcemap: true,
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: [],
watch: {
include: 'dist/es/**',
},
plugins: [
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs(),
// Resolve source maps to the original source
sourceMaps(),
],
// Allow node_modules resolution, so you can use 'external' to control
// which external modules to include in the bundle
// https://github.com/rollup/rollup-plugin-node-resolve#usage
resolve(),
// Resolve source maps to the original source
sourceMaps(),
],
};