aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-15 07:48:25 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-15 07:48:25 +0800
commit8e81b0680f407519a789c4f3de6245a8bafd3e72 (patch)
tree933517e1b0f87bd8054fb9f422c935bb83f55a5f /packages/instant
parent8afcba7ba16382fd656518e8de3b55267e0f7722 (diff)
downloaddexon-sol-tools-8e81b0680f407519a789c4f3de6245a8bafd3e72.tar
dexon-sol-tools-8e81b0680f407519a789c4f3de6245a8bafd3e72.tar.gz
dexon-sol-tools-8e81b0680f407519a789c4f3de6245a8bafd3e72.tar.bz2
dexon-sol-tools-8e81b0680f407519a789c4f3de6245a8bafd3e72.tar.lz
dexon-sol-tools-8e81b0680f407519a789c4f3de6245a8bafd3e72.tar.xz
dexon-sol-tools-8e81b0680f407519a789c4f3de6245a8bafd3e72.tar.zst
dexon-sol-tools-8e81b0680f407519a789c4f3de6245a8bafd3e72.zip
feat: expose webpack-dev-server content to local network
Diffstat (limited to 'packages/instant')
-rw-r--r--packages/instant/package.json3
-rw-r--r--packages/instant/webpack.config.js13
2 files changed, 14 insertions, 2 deletions
diff --git a/packages/instant/package.json b/packages/instant/package.json
index 3ad043c2b..23e1d57fe 100644
--- a/packages/instant/package.json
+++ b/packages/instant/package.json
@@ -52,9 +52,9 @@
"@0x/subproviders": "^2.1.4",
"@0x/types": "^1.2.1",
"@0x/typescript-typings": "^3.0.4",
- "bowser": "^2.0.0-beta.3",
"@0x/utils": "^2.0.5",
"@0x/web3-wrapper": "^3.1.4",
+ "bowser": "^2.0.0-beta.3",
"copy-to-clipboard": "^3.0.8",
"ethereum-types": "^1.1.2",
"lodash": "^4.17.10",
@@ -83,6 +83,7 @@
"awesome-typescript-loader": "^5.2.1",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
+ "ip": "^1.1.5",
"jest": "^23.6.0",
"make-promises-safe": "^1.1.0",
"npm-run-all": "^4.1.2",
diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js
index 78a33ce90..c566237e6 100644
--- a/packages/instant/webpack.config.js
+++ b/packages/instant/webpack.config.js
@@ -1,7 +1,8 @@
const path = require('path');
+const ip = require('ip');
// The common js bundle (not this one) is built using tsc.
// The umd bundle (this one) has a different entrypoint.
-module.exports = {
+const config = {
entry: './src/index.umd.ts',
output: {
filename: '[name].bundle.js',
@@ -24,5 +25,15 @@ module.exports = {
devServer: {
contentBase: path.join(__dirname, 'public'),
port: 5000,
+ host: '0.0.0.0',
+ after: () => {
+ if (config.devServer.host === '0.0.0.0') {
+ console.log(
+ `webpack-dev-server can be accessed externally at: ${ip.address()}:${config.devServer.port}`,
+ );
+ }
+ },
},
};
+
+module.exports = config;