aboutsummaryrefslogtreecommitdiffstats
path: root/packages/kovan-faucets/gulpfile.js
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-13 05:06:02 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-12-13 07:56:30 +0800
commit1e9f23ebba5e0729b64e757d6901205278871e9f (patch)
treead768a48539ebaa66f0c852f4d9a2183cbbcb2ce /packages/kovan-faucets/gulpfile.js
parentbbb768c5cfa8bf713670608f859debae42b42898 (diff)
downloaddexon-sol-tools-1e9f23ebba5e0729b64e757d6901205278871e9f.tar
dexon-sol-tools-1e9f23ebba5e0729b64e757d6901205278871e9f.tar.gz
dexon-sol-tools-1e9f23ebba5e0729b64e757d6901205278871e9f.tar.bz2
dexon-sol-tools-1e9f23ebba5e0729b64e757d6901205278871e9f.tar.lz
dexon-sol-tools-1e9f23ebba5e0729b64e757d6901205278871e9f.tar.xz
dexon-sol-tools-1e9f23ebba5e0729b64e757d6901205278871e9f.tar.zst
dexon-sol-tools-1e9f23ebba5e0729b64e757d6901205278871e9f.zip
Fix build errors
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/
},