mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Add npm and minified builds
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const webpack = require('webpack');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json')));
|
||||
|
||||
const banner =
|
||||
@@ -36,6 +36,16 @@ module.exports = [
|
||||
module: modules,
|
||||
plugins
|
||||
},
|
||||
{
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
filename: './dist/html2canvas.min.js',
|
||||
library: 'html2canvas',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
module: modules,
|
||||
plugins: plugins.concat([new UglifyJSPlugin(), new webpack.BannerPlugin(banner)])
|
||||
},
|
||||
{
|
||||
entry: './src/renderer/RefTestRenderer.js',
|
||||
output: {
|
||||
|
||||
Reference in New Issue
Block a user