Skip to content

Commit

Permalink
feat: fix starting script
Browse files Browse the repository at this point in the history
  • Loading branch information
zeevo committed May 12, 2020
1 parent 9c9071e commit 707c2f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/start.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/*eslint-disable func-names, prefer-arrow-callback, no-console */

// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'development';
process.env.NODE_ENV = 'development';
Expand Down Expand Up @@ -30,7 +28,7 @@ const {

const paths = require('../config/paths');
const configFactory = require('../config/webpack.config');
const createDevServerConfig = require('../config/webpackDevServer');
const createDevServerConfig = require('../config/webpackDevServer.config');

const config = configFactory('development');

Expand All @@ -53,13 +51,15 @@ choosePort(HOST, DEFAULT_PORT)
// We have not found a port.
return;
}
console.log('thing', paths.appPackageJson);

const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const appName = require(paths.packageJson).name;
const appName = require(paths.appPackageJson).name;
const urls = prepareUrls(protocol, HOST, port);
const compiler = createCompiler({ webpack, config, appName, urls });

// Load proxy config
const proxySetting = require(paths.packageJson).proxy;
const proxySetting = require(paths.appPackageJson).proxy;
const proxyConfig = prepareProxy(proxySetting, paths.appAssets);
// Serve webpack assets generated by the compiler over a web sever.
const serverConfig = createDevServerConfig(proxyConfig, urls.lanUrlForConfig);
Expand Down

0 comments on commit 707c2f1

Please sign in to comment.