diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2017-12-13 05:06:02 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2017-12-13 07:56:30 +0800 |
commit | 1e9f23ebba5e0729b64e757d6901205278871e9f (patch) | |
tree | ad768a48539ebaa66f0c852f4d9a2183cbbcb2ce /packages/kovan-faucets/gulpfile.js | |
parent | bbb768c5cfa8bf713670608f859debae42b42898 (diff) | |
download | dexon-0x-contracts-1e9f23ebba5e0729b64e757d6901205278871e9f.tar.gz dexon-0x-contracts-1e9f23ebba5e0729b64e757d6901205278871e9f.tar.zst dexon-0x-contracts-1e9f23ebba5e0729b64e757d6901205278871e9f.zip |
Fix build errors
Diffstat (limited to 'packages/kovan-faucets/gulpfile.js')
-rw-r--r-- | packages/kovan-faucets/gulpfile.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/packages/kovan-faucets/gulpfile.js b/packages/kovan-faucets/gulpfile.js index 3e80e656e..773faf33a 100644 --- a/packages/kovan-faucets/gulpfile.js +++ b/packages/kovan-faucets/gulpfile.js @@ -3,19 +3,11 @@ const nodemon = require('nodemon'); const path = require('path'); const webpack = require('webpack'); const fs = require('fs'); - -const nodeModules = {}; -fs.readdirSync('node_modules') - .filter(function(x) { - return ['.bin'].indexOf(x) === -1; - }) - .forEach(function(mod) { - nodeModules[mod] = 'commonjs ' + mod; - }); +const nodeExternals = require('webpack-node-externals'); const config = { target: 'node', - entry: ['./src/ts/server.ts'], + entry: [path.join(__dirname, '/src/ts/server.ts')], output: { path: path.join(__dirname, '/bin'), filename: 'server.js', @@ -51,7 +43,9 @@ const config = { entryOnly: false, }), ], - externals: nodeModules, + externals: nodeExternals({ + modulesDir: path.join(__dirname, '../../node_modules') + }), watchOptions: { ignored: /bin|node_modules|transpiled/ }, |