UNPKG

micro-editor

Version:

1. npm install

24 lines 757 B
const merge = require('webpack-merge'); const webpack = require('webpack'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const common = require('./webpack.common.js'); const path = require('path'); module.exports = merge(common, { entry: './src/components/photo-editor.tsx', output: { filename: '[name].js', chunkFilename: '[name].js', path: path.resolve(__dirname, 'lib'), libraryTarget: "umd", library: 'editor' }, mode: "development", plugins: [ new CleanWebpackPlugin(['lib']), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }), // new BundleAnalyzerPlugin(), ] });