Skip to content

Commit 6143e75

Browse files
committed
Remove fs patching
1 parent 953e473 commit 6143e75

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

src/playground/custom.d.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,4 @@ declare module "worker-loader!*" {
66
export default WebpackWorker;
77
}
88

9-
interface FSDummy {
10-
readFileSync(fileName: string): Buffer;
11-
}
12-
13-
interface Window {
14-
fs: FSDummy;
15-
}
16-
179
declare module "fengari-web";

src/playground/webpack.config.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
11
const path = require("path");
22
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
33
const HtmlWebpackPlugin = require("html-webpack-plugin");
4-
const fs = require("fs");
5-
64
const merge = require("webpack-merge");
75
const common = require("../webpack.common.js");
86

9-
// hack to patch fs because i cant get externals to work and dont know wtf is
10-
// going on in webpack
11-
const replaceFsInPaths = [
12-
path.resolve(__dirname, "../../node_modules/typescript-to-lua/dist/LuaLib.js"),
13-
path.resolve(__dirname, "../../node_modules/typescript-to-lua/node_modules/source-map/lib/read-wasm.js"),
14-
];
15-
16-
replaceFsInPaths.forEach(p => {
17-
fs.writeFileSync(
18-
p,
19-
fs
20-
.readFileSync(p)
21-
.toString()
22-
.replace('const fs = require("fs");', ""),
23-
);
24-
});
25-
267
module.exports = merge(common, {
278
entry: path.resolve(__dirname, "./index.ts"),
289
node: { fs: "empty" },

0 commit comments

Comments
 (0)