Files
cloudbeaver/webapp/packages/core-cli/configs/webpack.plugin.config.js
T
Alexey 229452c262 Chore/prettier (#1707)
* chore: add prettier

* chore: format code

* chore: remove eslint ts integration

* chore: update webpack.config
2023-05-29 02:54:14 +03:00

33 lines
844 B
JavaScript

const { resolve } = require('path');
const PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin');
const { merge } = require('webpack-merge');
const commonConfig = require('./webpack.config.js');
const main = resolve('src/index.ts');
const outputDir = resolve('lib');
const package = require(resolve('package.json'));
module.exports = (env, argv) => merge(commonConfig(env, argv), {
entry: {
[package.name.replace('@cloudbeaver/', '')]: main,
},
output: {
filename: '[name].js',
chunkFilename: '[name].[contenthash].bundle.js',
library: package.name,
libraryTarget: 'commonjs',
path: outputDir,
},
optimization: {
// splitChunks: {
// chunks: 'all',
// },
// minimize: false,
// concatenateModules: false,
},
plugins: [
new PeerDepsExternalsPlugin(),
],
});