Skip to content

Commit

Permalink
fix: add current working directory to avoid the module cannnot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
vanpipy authored and jaywcjlove committed Nov 6, 2020
1 parent 651b3ec commit d1217a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/bin/mocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ interface MockerConfig extends MockerOption {
port: number;
}

const DEFAULT_MOCKER_CONFIG_PATH = './mocker.config.json';
const CWD = process.cwd();
const PKG_PATH = path.resolve(CWD, './package.json');
const DEFAULT_MOCKER_CONFIG_PATH = path.resolve(CWD, './mocker.config.json');
const DEFAULT_MOCK_PATH = ['./mock'];
const PKG_PATH = './package.json';
const DEFAULT_CONFIG: MockerConfig = {
host: '0.0.0.0',
port: 3721
Expand Down

0 comments on commit d1217a2

Please sign in to comment.