diff --git a/packages/cli/src/commands/build/build.js b/packages/cli/src/commands/build/build.js index ba0488618..906af4f2e 100644 --- a/packages/cli/src/commands/build/build.js +++ b/packages/cli/src/commands/build/build.js @@ -17,7 +17,6 @@ import path from 'path'; import getBuildScript from './getBuildScript'; import getLowdefyVersion from '../../utils/getLowdefyVersion'; -import errorBoundary from '../../utils/errorBoundary'; import createPrint from '../../utils/print'; async function build(program) { @@ -36,4 +35,4 @@ async function build(program) { }); } -export default errorBoundary(build); +export default build; diff --git a/packages/cli/src/index.js b/packages/cli/src/index.js index 1278376bb..c3103be39 100755 --- a/packages/cli/src/index.js +++ b/packages/cli/src/index.js @@ -17,6 +17,7 @@ import program from 'commander'; import packageJson from '../package.json'; import build from './commands/build/build.js'; +import errorHandler from './utils/errorHandler'; const { description, version } = packageJson; @@ -30,6 +31,6 @@ program '--base-directory ', 'Change base directory. Default is the current working directory.' ) - .action(build); + .action(errorHandler(build)); program.parse(process.argv); diff --git a/packages/cli/src/utils/errorBoundary.js b/packages/cli/src/utils/errorHandler.js similarity index 100% rename from packages/cli/src/utils/errorBoundary.js rename to packages/cli/src/utils/errorHandler.js diff --git a/packages/cli/src/utils/errorBoundary.test.js b/packages/cli/src/utils/errorHandler.test.js similarity index 100% rename from packages/cli/src/utils/errorBoundary.test.js rename to packages/cli/src/utils/errorHandler.test.js diff --git a/packages/cli/src/utils/loadModule.js b/packages/cli/src/utils/loadModule.js index 75c5963f9..8c6fc4ab1 100644 --- a/packages/cli/src/utils/loadModule.js +++ b/packages/cli/src/utils/loadModule.js @@ -14,6 +14,8 @@ limitations under the License. */ +/*global __webpack_share_scopes__, __webpack_init_sharing__, __non_webpack_require__*/ + import path from 'path'; async function loadModule(dir, moduleName, remoteEntry = 'remoteEntry.js') {