html2canvas/rollup.config.js

38 lines
954 B
JavaScript
Raw Normal View History

2018-07-06 17:28:30 +03:00
'use strict';
const fs = require('fs');
const path = require('path');
const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json')));
const banner =
`/*
${pkg.title} ${pkg.version} <${pkg.homepage}>
Copyright (c) ${(new Date()).getFullYear()} ${pkg.author.name} <${pkg.author.url}>
Released under ${pkg.license} License
*/`;
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
export default {
input: './src/index.js',
plugins: [
resolve(),
babel({
exclude: 'node_modules/**'
}),
commonjs({
namedExports: {
'node_modules/css-line-break/dist/index.js': ['toCodePoints', 'fromCodePoint', 'LineBreaker']
}
})
],
output: {
file: './dist/html2canvas.js',
name: 'html2canvas',
format: 'umd',
banner
}
};