-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use Node.js functions when bundling for the browser (#67)
- Loading branch information
1 parent
4fe2e83
commit 783ccd5
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/babel-helper-define-polyfill-provider/src/browser/dependencies.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// @flow | ||
|
||
export function resolve( | ||
dirname: string, | ||
moduleName: string, | ||
absoluteImports: boolean | string, | ||
): string { | ||
if (absoluteImports === false) return moduleName; | ||
|
||
throw new Error( | ||
`"absoluteImports" is not supported in bundles prepared for the browser.`, | ||
); | ||
} | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
export function has(basedir: string, name: string) { | ||
return true; | ||
} | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
export function logMissing(missingDeps: Set<string>) {} | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
export function laterLogMissing(missingDeps: Set<string>) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.