Skip to content

Commit

Permalink
feat: drop special webpack configs
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Oct 27, 2016
1 parent 3299ce1 commit 6a726b2
Showing 1 changed file with 2 additions and 51 deletions.
53 changes: 2 additions & 51 deletions config/webpack.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict'

const webpack = require('webpack')
const path = require('path')
const upperFirst = require('lodash.upperfirst')
const camelCase = require('lodash.camelcase')
Expand Down Expand Up @@ -44,11 +43,7 @@ const shared = {
modules: [
'node_modules',
path.resolve(__dirname, '../node_modules')
],
alias: {
http: require.resolve('stream-http'),
https: require.resolve('https-browserify')
}
]
},
resolveLoader: {
modules: [
Expand All @@ -67,59 +62,15 @@ const shared = {
include: /node_modules\/(hoek|qs|wreck|boom|ipfs|promisify-es|whatwg-fetch|node-fetch|isomorphic-fetch|db\.js)/,
loader: 'babel',
query: babel
}, {
test: /\.js$/,
include: /node_modules\/cbor/,
loader: 'babel',
query: {
plugins: [
// All things supported by node >= 4.0
'babel-plugin-transform-es2015-template-literals',
'babel-plugin-transform-es2015-literals',
'babel-plugin-transform-es2015-function-name',
'babel-plugin-transform-es2015-arrow-functions',
'babel-plugin-transform-es2015-block-scoped-functions',
'babel-plugin-transform-es2015-classes',
'babel-plugin-transform-es2015-object-super',
'babel-plugin-transform-es2015-shorthand-properties',
'babel-plugin-transform-es2015-duplicate-keys',
'babel-plugin-transform-es2015-computed-properties',
'babel-plugin-transform-es2015-for-of',
// 'babel-plugin-transform-es2015-sticky-regex',
// 'babel-plugin-transform-es2015-unicode-regex',
'babel-plugin-check-es2015-constants',
// 'babel-plugin-transform-es2015-spread',
// 'babel-plugin-transform-es2015-parameters',
// 'babel-plugin-transform-es2015-destructuring',
'babel-plugin-transform-es2015-block-scoping',
'babel-plugin-transform-es2015-typeof-symbol',
// 'babel-plugin-transform-es2015-modules-commonjs',
'babel-plugin-transform-regenerator'
].map((p) => require.resolve(p))
}
}, {
test: /\.json$/,
loader: 'json'
}, {
test: /\.js$/,
loader: 'transform?brfs',
enforce: 'pre'
}]
},
externals: {
net: '{}',
fs: '{}',
tls: '{}',
console: '{}',
'require-dir': '{}',
ursa: '{}'
},
node: {
Buffer: true
},
plugins: [
new webpack.DefinePlugin({'fs.writeSync': false})
]
plugins: []
}

const dev = merge(shared, {
Expand Down

0 comments on commit 6a726b2

Please sign in to comment.