mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-11-22 01:36:56 +01:00
34289b0640
declare Buffer as webpack plugin
33 lines
848 B
JavaScript
33 lines
848 B
JavaScript
// Copyright BigchainDB GmbH and BigchainDB contributors
|
|
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
// Code is Apache-2.0 and docs are CC-BY-4.0
|
|
|
|
/* eslint-disable strict, no-console, object-shorthand, import/no-extraneous-dependencies */
|
|
|
|
'use strict'
|
|
|
|
const TerserPlugin = require('terser-webpack-plugin')
|
|
|
|
module.exports = {
|
|
devtool: 'inline-source-map',
|
|
optimization: {
|
|
minimizer: [
|
|
new TerserPlugin({
|
|
test: /vendor/,
|
|
}),
|
|
new TerserPlugin({
|
|
test: /^((?!(vendor)).)*.js$/,
|
|
})
|
|
],
|
|
splitChunks: {
|
|
cacheGroups: {
|
|
commons: {
|
|
test: /[\\/]node_modules[\\/]/,
|
|
name: 'vendors',
|
|
chunks: 'all'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|