mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
31 lines
826 B
JavaScript
31 lines
826 B
JavaScript
const { merge } = require('webpack-merge');
|
|
const { resolve, join } = require('path');
|
|
var PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin');
|
|
const commonConfig = require('./webpack.config.js');
|
|
|
|
var main = resolve('src/index.ts');
|
|
var outputDir = resolve('lib');
|
|
var package = require(resolve("package.json"));
|
|
|
|
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
|
entry: main,
|
|
output: {
|
|
filename: 'index.[contenthash].js',
|
|
chunkFilename: '[name].[contenthash].bundle.js',
|
|
library: package.name,
|
|
libraryTarget: 'commonjs',
|
|
path: outputDir,
|
|
},
|
|
optimization: {
|
|
// splitChunks: {
|
|
// chunks: 'all',
|
|
// },
|
|
// minimize: false,
|
|
// namedModules: false,
|
|
// concatenateModules: false,
|
|
},
|
|
plugins: [
|
|
new PeerDepsExternalsPlugin(),
|
|
],
|
|
});
|