diff --git a/webpack-prod.config.js b/webpack-prod.config.js index 7ac46dc..cc46a77 100644 --- a/webpack-prod.config.js +++ b/webpack-prod.config.js @@ -1,15 +1,8 @@ -const path = require('path'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); - const package = require('./package.json'); -const externals = new Set([ - ...Object.keys(package.dependencies || {}), - ...Object.keys(package.peerDependencies || {}), -]); +const externals = new Set([...Object.keys(package.dependencies || {}), ...Object.keys(package.peerDependencies || {})]); const config = { - target: 'web', mode: 'production', devtool: 'inline-source-map', entry: { @@ -17,13 +10,12 @@ const config = { 'redux-adapter': './src/redux/index.ts', }, output: { - path: __dirname+'/dist', + path: __dirname + '/dist', filename: '[name].js', sourceMapFilename: '[name].map', library: 'eventrix', libraryTarget: 'umd', - globalObject: 'window', - umdNamedDefine: true + umdNamedDefine: true, }, externals(context, request, callback) { if (externals.has(request)) { @@ -49,7 +41,7 @@ const config = { ], }, ], - } + }, }; module.exports = config;