File tree 2 files changed +0
-27
lines changed 2 files changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,4 @@ declare module "worker-loader!*" {
6
6
export default WebpackWorker ;
7
7
}
8
8
9
- interface FSDummy {
10
- readFileSync ( fileName : string ) : Buffer ;
11
- }
12
-
13
- interface Window {
14
- fs : FSDummy ;
15
- }
16
-
17
9
declare module "fengari-web" ;
Original file line number Diff line number Diff line change 1
1
const path = require ( "path" ) ;
2
2
const MonacoWebpackPlugin = require ( "monaco-editor-webpack-plugin" ) ;
3
3
const HtmlWebpackPlugin = require ( "html-webpack-plugin" ) ;
4
- const fs = require ( "fs" ) ;
5
-
6
4
const merge = require ( "webpack-merge" ) ;
7
5
const common = require ( "../webpack.common.js" ) ;
8
6
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
-
26
7
module . exports = merge ( common , {
27
8
entry : path . resolve ( __dirname , "./index.ts" ) ,
28
9
node : { fs : "empty" } ,
You can’t perform that action at this time.
0 commit comments