mirror of https://github.com/lukechilds/rollup.git
2 changed files with 6 additions and 13 deletions
@ -1,13 +1,5 @@ |
|||
export function readdirSync () { |
|||
throw new Error( 'Cannot use fs.readdirSync inside browser' ); |
|||
} |
|||
const nope = method => `Cannot use fs.${method} inside browser`; |
|||
|
|||
export function readFileSync () { |
|||
throw new Error( 'Cannot use fs.readFileSync inside browser' ); |
|||
} |
|||
|
|||
export function writeFile () { |
|||
throw new Error( 'Cannot use fs.writeFile inside browser' ); |
|||
} |
|||
|
|||
export const Promise = window.Promise; |
|||
export const readdirSync = nope( 'readdirSync' ); |
|||
export const readFileSync = nope( 'readFileSync' ); |
|||
export const writeFile = nope( 'writeFile' ); |
|||
|
Loading…
Reference in new issue