UNPKG

his-tree

Version:

his tree vue component

35 lines (31 loc) 886 B
const path = require('path'); const webpack = require('webpack'); const merge = require('webpack-merge'); const baseWebpackConfig = require('./webpack.base.conf'); const pkg = require('./package.json'); const plugins = []; console.log(process.env.npm_config_report); if (process.env.npm_config_report) { const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; plugins.push(new BundleAnalyzerPlugin()); } module.exports = merge(baseWebpackConfig, { entry: { 'index': path.join(__dirname, 'src/index.vue') }, output: { path: path.join(__dirname, 'lib'), publicPath: '/', library: pkg.name, libraryTarget: 'umd', filename: '[name].js' }, externals: { 'vue': 'vue', 'element-ui': 'element-ui' }, plugins: [ new webpack.optimize.UglifyJsPlugin(), ...plugins ] });