diff --git a/desktop/pkg-lib/src/runBuild.ts b/desktop/pkg-lib/src/runBuild.ts index 67a0eacaf..a5c8b91aa 100644 --- a/desktop/pkg-lib/src/runBuild.ts +++ b/desktop/pkg-lib/src/runBuild.ts @@ -29,32 +29,6 @@ async function getMetroDir() { return __dirname; } -function hash(string: string) { - let hash = 0; - if (string.length === 0) { - return hash; - } - let chr; - for (let i = 0; i < string.length; i++) { - chr = string.charCodeAt(i); - hash = (hash << 5) - hash + chr; - hash |= 0; - } - return hash; -} -const fileToIdMap = new Map(); -const createModuleIdFactory = () => (filePath: string) => { - if (filePath === '__prelude__') { - return 0; - } - let id = fileToIdMap.get(filePath); - if (typeof id !== 'number') { - id = hash(filePath); - fileToIdMap.set(filePath, id); - } - return id; -}; - export default async function runBuild( inputDirectory: string, entry: string, @@ -72,7 +46,6 @@ export default async function runBuild( ...baseConfig.serializer, getRunModuleStatement: (moduleID: string) => `module.exports = global.__r(${moduleID}).default;`, - createModuleIdFactory, }, transformer: { ...baseConfig.transformer,