2
This commit is contained in:
		
							parent
							
								
									a14cca8961
								
							
						
					
					
						commit
						987a7646e1
					
				@ -4,7 +4,7 @@
 | 
			
		||||
  "description": "WF Emulator",
 | 
			
		||||
  "main": "index.ts",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "start": "node --enable-source-maps --import ./build/src/pathman.js build/src/index.js",
 | 
			
		||||
    "start": "node --enable-source-maps build/src/index.js",
 | 
			
		||||
    "build": "tsgo --sourceMap && ncp static/webui build/static/webui",
 | 
			
		||||
    "build:tsc": "tsc --incremental --sourceMap && ncp static/webui build/static/webui",
 | 
			
		||||
    "build:dev": "tsgo --sourceMap",
 | 
			
		||||
 | 
			
		||||
@ -1,13 +0,0 @@
 | 
			
		||||
// Hooks node to support require from "@/" paths for `npm run build && npm run start`.
 | 
			
		||||
// Based on https://github.com/dividab/tsconfig-paths
 | 
			
		||||
 | 
			
		||||
/* eslint-disable */
 | 
			
		||||
const Module = require("module");
 | 
			
		||||
const originalResolveFilename = Module._resolveFilename;
 | 
			
		||||
Module._resolveFilename = function (request: string, _parent: any): string {
 | 
			
		||||
    if (request.substring(0, 2) == "@/") {
 | 
			
		||||
        const modifiedArguments = [process.cwd() + "/build/" + request.substr(2), ...[].slice.call(arguments, 1)]; // Passes all arguments. Even those that is not specified above.
 | 
			
		||||
        return originalResolveFilename.apply(this, modifiedArguments);
 | 
			
		||||
    }
 | 
			
		||||
    return originalResolveFilename.apply(this, arguments);
 | 
			
		||||
};
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user