From 1e9f23ebba5e0729b64e757d6901205278871e9f Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 12 Dec 2017 13:06:02 -0800 Subject: Fix build errors --- packages/kovan-faucets/gulpfile.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'packages/kovan-faucets/gulpfile.js') 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/ }, -- cgit v1.2.3