1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-22 09:46:58 +01:00
js-bigchaindb-driver/webpack.config.js

31 lines
672 B
JavaScript
Raw Normal View History

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)
}