Skip to content

Commit

Permalink
fix(es-modules): lodash es module definition
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jul 29, 2020
1 parent 938b61b commit 7f1429f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/es-modules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export const MODULE_DEFINITIONS: ModuleDefinitions = {
target: 'dayjs/esm',
exact: false,
},
lodash: 'lodash-es',
lodash: {
target: 'lodash-es',
exact: false,
},
systemjs: 'systemjs/dist/system',
}

Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function startBrowserProcess(
stdio: 'ignore',
})
return true
} catch (err) {
} catch {
// Ignore errors.
}
}
Expand All @@ -103,7 +103,7 @@ function startBrowserProcess(
// eslint-disable-next-line @typescript-eslint/no-empty-function
open(url, options).catch(() => {}) // Prevent `unhandledRejection` error.
return true
} catch (err) {
} catch {
return false
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const tryPkg = (pkg: string) => {

export const tryRequirePkg = <T>(pkg: string): T | undefined => {
try {
// eslint-disable-next-line @typescript-eslint/no-require-imports
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-return
return require(pkg)
} catch {}
}
Expand Down

0 comments on commit 7f1429f

Please sign in to comment.