Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Przodała authored and Mariusz Przodała committed Mar 27, 2022
2 parents 1cd682e + b5773a2 commit 11666ac
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions webpack-prod.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
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: {
index: './src/index.ts',
'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)) {
Expand All @@ -49,7 +41,7 @@ const config = {
],
},
],
}
},
};

module.exports = config;

0 comments on commit 11666ac

Please sign in to comment.