Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Craig Morten <cmorten@users.noreply.github.com>
- Loading branch information
1 parent
26ced57
commit 4770ed5
Showing
1 changed file
with
7 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { error } from '../src/utils/error'; | ||
|
||
export const throwNoFileSystem = (method: string) => (..._args: any[]): never => { | ||
throw Object.assign( | ||
new Error( | ||
`Cannot access the file system (via "${method}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.` | ||
), | ||
{ code: 'NO_FS_IN_BROWSER', url: 'https://rollupjs.org/guide/en/#a-simple-example' } | ||
); | ||
error({ | ||
code: 'NO_FS_IN_BROWSER', | ||
message: `Cannot access the file system (via "${method}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`, | ||
url: 'https://rollupjs.org/guide/en/#a-simple-example' | ||
}); | ||
}; |