diff --git a/config/webpack.js b/config/webpack.js index eab87579e..6f60afc99 100644 --- a/config/webpack.js +++ b/config/webpack.js @@ -1,6 +1,5 @@ 'use strict' -const webpack = require('webpack') const path = require('path') const upperFirst = require('lodash.upperfirst') const camelCase = require('lodash.camelcase') @@ -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: [ @@ -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, {