From 7e6f62a6a002403e4f84f07c69292af50b855dbf Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Wed, 31 May 2023 17:10:21 +0200 Subject: [PATCH] chore: Make webpack config cleaner --- config/webpack/webpack.dist.config.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/config/webpack/webpack.dist.config.js b/config/webpack/webpack.dist.config.js index 853de17f..03c8ae8c 100644 --- a/config/webpack/webpack.dist.config.js +++ b/config/webpack/webpack.dist.config.js @@ -1,9 +1,15 @@ -const path = require('path'); +const { join } = require('path'); const nodeExternals = require('webpack-node-externals'); -//const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; module.exports = { - entry: path.join(__dirname, '../../src/index.js'), + entry: join(__dirname, '../../src/index.js'), + output: { + filename: 'index.js', + globalObject: 'this', + library: 'informed', + libraryTarget: 'umd', + umdNamedDefine: true + }, target: 'web', mode: 'production', devtool: 'source-map', @@ -25,18 +31,7 @@ module.exports = { } ] }, - // plugins: [ - // new BundleAnalyzerPlugin() - // ], - output: { - filename: 'index.js', - globalObject: 'this', - library: 'informed', - libraryTarget: 'umd', - umdNamedDefine: true - }, optimization: { - //usedExports: true namedModules: true } };