Skip to content

Commit

Permalink
Update browser/error.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Craig Morten <cmorten@users.noreply.github.com>
  • Loading branch information
lukastaegert and cmorten committed Jan 28, 2021
1 parent 26ced57 commit 3adbedd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions browser/error.ts
@@ -1,8 +1,10 @@
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({
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.`,
code: 'NO_FS_IN_BROWSER',
url: 'https://rollupjs.org/guide/en/#a-simple-example'
});
};

0 comments on commit 3adbedd

Please sign in to comment.