aboutsummaryrefslogtreecommitdiffstats
path: root/packages/kovan-faucets/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/kovan-faucets/gulpfile.js')
-rw-r--r--packages/kovan-faucets/gulpfile.js16
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/
},