1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-27 21:00:02 +01:00
js-bigchaindb-driver/webpack.config.js

35 lines
830 B
JavaScript
Raw Normal View History

// 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
2017-04-26 15:58:19 +02:00
/* eslint-disable strict, no-console, object-shorthand */
2017-06-12 16:57:29 +02:00
'use strict'
2017-04-26 15:58:19 +02:00
2017-06-12 16:57:29 +02:00
const PRODUCTION = process.env.NODE_ENV === 'production'
2017-04-26 15:58:19 +02:00
const common = require('./webpack.common.js')
2017-06-21 17:39:19 +02:00
const { outputs } = require('./webpack.parts.js')
2017-04-26 15:58:19 +02:00
// '[libraryTarget]': [file extension]
const OUTPUT_MAPPING = {
'amd': 'amd',
'commonjs': 'cjs',
'commonjs2': 'cjs2',
'umd': 'umd',
'window': 'window',
2017-04-26 15:58:19 +02:00
}
const OVERRIDES = {
// optimization: {
// minimize: false
// }
2017-06-12 16:57:29 +02:00
}
2017-04-26 15:58:19 +02:00
if (PRODUCTION) {
module.exports = outputs(common, 'production', OUTPUT_MAPPING, OVERRIDES)
} else {
module.exports = outputs(common, 'development', OUTPUT_MAPPING, OVERRIDES)
}