You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
437 B
18 lines
437 B
// Minimal fs module implementation for browser
|
|
const fs = {
|
|
readFileSync: () => {
|
|
throw new Error("fs.readFileSync is not supported in browser");
|
|
},
|
|
writeFileSync: () => {
|
|
throw new Error("fs.writeFileSync is not supported in browser");
|
|
},
|
|
existsSync: () => false,
|
|
mkdirSync: () => {},
|
|
readdirSync: () => [],
|
|
statSync: () => ({
|
|
isDirectory: () => false,
|
|
isFile: () => false,
|
|
}),
|
|
};
|
|
|
|
export default fs;
|
|
|