Skip to content

Commit

Permalink
fix: terser to ignore every exported tinymidipcm symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraviolet-jordan committed Jul 26, 2024
1 parent 2cff17c commit 1fb08a6
Showing 1 changed file with 249 additions and 9 deletions.
258 changes: 249 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const htmlPlugins = pages.map(name => {
const config = {
entry: {
index: './src/js/game.ts',
playground: './src/js/playground.js',
viewer: './src/js/viewer.ts',
mesanim: './src/js/mesanim.ts',
items: './src/js/items.ts',
sounds: './src/js/sounds.ts',
['interface-editor']: './src/js/interface-editor.ts',
JagEd: './src/js/JagEd.ts',
mapview: './src/js/mapview.ts'
// playground: './src/js/playground.js',
// viewer: './src/js/viewer.ts',
// mesanim: './src/js/mesanim.ts',
// items: './src/js/items.ts',
// sounds: './src/js/sounds.ts',
// ['interface-editor']: './src/js/interface-editor.ts',
// JagEd: './src/js/JagEd.ts',
// mapview: './src/js/mapview.ts'
},

plugins: [
Expand Down Expand Up @@ -149,7 +149,247 @@ module.exports = () => {
'__getU32',
'__pin',
'__new',
'__unpin'
'__unpin',
'run',
'UTF8ArrayToString',
'UTF8ToString',
'stringToUTF8Array',
'stringToUTF8',
'lengthBytesUTF8',
'addOnPreRun',
'addOnInit',
'addOnPreMain',
'addOnExit',
'addOnPostRun',
'addRunDependency',
'removeRunDependency',
'FS_createFolder',
'FS_createPath',
'FS_createDataFile',
'FS_createPreloadedFile',
'FS_createLazyFile',
'FS_createLink',
'FS_createDevice',
'FS_unlink',
'getLEB',
'getFunctionTables',
'alignFunctionTables',
'registerFunctions',
'prettyPrint',
'getCompilerSetting',
'print',
'printErr',
'callMain',
'abort',
'keepRuntimeAlive',
'wasmMemory',
'stackAlloc',
'stackSave',
'stackRestore',
'getTempRet0',
'setTempRet0',
'writeStackCookie',
'checkStackCookie',
'ptrToString',
'zeroMemory',
'stringToNewUTF8',
'exitJS',
'getHeapMax',
'emscripten_realloc_buffer',
'ENV',
'ERRNO_CODES',
'ERRNO_MESSAGES',
'setErrNo',
'inetPton4',
'inetNtop4',
'inetPton6',
'inetNtop6',
'readSockaddr',
'writeSockaddr',
'DNS',
'getHostByName',
'Protocols',
'Sockets',
'getRandomDevice',
'warnOnce',
'traverseStack',
'UNWIND_CACHE',
'convertPCtoSourceLocation',
'readAsmConstArgsArray',
'readAsmConstArgs',
'mainThreadEM_ASM',
'jstoi_q',
'jstoi_s',
'getExecutableName',
'listenOnce',
'autoResumeAudioContext',
'dynCallLegacy',
'getDynCaller',
'dynCall',
'handleException',
'runtimeKeepalivePush',
'runtimeKeepalivePop',
'callUserCallback',
'maybeExit',
'safeSetTimeout',
'asmjsMangle',
'asyncLoad',
'alignMemory',
'mmapAlloc',
'writeI53ToI64',
'writeI53ToI64Clamped',
'writeI53ToI64Signaling',
'writeI53ToU64Clamped',
'writeI53ToU64Signaling',
'readI53FromI64',
'readI53FromU64',
'convertI32PairToI53',
'convertI32PairToI53Checked',
'convertU32PairToI53',
'getCFunc',
'ccall',
'cwrap',
'uleb128Encode',
'sigToWasmTypes',
'generateFuncType',
'convertJsFunctionToWasm',
'freeTableIndexes',
'functionsInTableMap',
'getEmptyTableSlot',
'updateTableMap',
'addFunction',
'removeFunction',
'reallyNegative',
'unSign',
'strLen',
'reSign',
'formatString',
'PATH',
'PATH_FS',
'intArrayFromString',
'intArrayToString',
'AsciiToString',
'stringToAscii',
'UTF16Decoder',
'UTF16ToString',
'stringToUTF16',
'lengthBytesUTF16',
'UTF32ToString',
'stringToUTF32',
'lengthBytesUTF32',
'allocateUTF8',
'allocateUTF8OnStack',
'writeStringToMemory',
'writeArrayToMemory',
'writeAsciiToMemory',
'SYSCALLS',
'getSocketFromFD',
'getSocketAddress',
'JSEvents',
'registerKeyEventCallback',
'specialHTMLTargets',
'maybeCStringToJsString',
'findEventTarget',
'findCanvasEventTarget',
'getBoundingClientRect',
'fillMouseEventData',
'registerMouseEventCallback',
'registerWheelEventCallback',
'registerUiEventCallback',
'registerFocusEventCallback',
'fillDeviceOrientationEventData',
'registerDeviceOrientationEventCallback',
'fillDeviceMotionEventData',
'registerDeviceMotionEventCallback',
'screenOrientation',
'fillOrientationChangeEventData',
'registerOrientationChangeEventCallback',
'fillFullscreenChangeEventData',
'registerFullscreenChangeEventCallback',
'JSEvents_requestFullscreen',
'JSEvents_resizeCanvasForFullscreen',
'registerRestoreOldStyle',
'hideEverythingExceptGivenElement',
'restoreHiddenElements',
'setLetterbox',
'currentFullscreenStrategy',
'restoreOldWindowedStyle',
'softFullscreenResizeWebGLRenderTarget',
'doRequestFullscreen',
'fillPointerlockChangeEventData',
'registerPointerlockChangeEventCallback',
'registerPointerlockErrorEventCallback',
'requestPointerLock',
'fillVisibilityChangeEventData',
'registerVisibilityChangeEventCallback',
'registerTouchEventCallback',
'fillGamepadEventData',
'registerGamepadEventCallback',
'registerBeforeUnloadEventCallback',
'fillBatteryEventData',
'battery',
'registerBatteryEventCallback',
'setCanvasElementSize',
'getCanvasElementSize',
'demangle',
'demangleAll',
'jsStackTrace',
'stackTrace',
'ExitStatus',
'getEnvStrings',
'checkWasiClock',
'flush_NO_FILESYSTEM',
'dlopenMissingError',
'createDyncallWrapper',
'setImmediateWrapped',
'clearImmediateWrapped',
'polyfillSetImmediate',
'uncaughtExceptionCount',
'exceptionLast',
'exceptionCaught',
'ExceptionInfo',
'exception_addRef',
'exception_decRef',
'Browser',
'setMainLoop',
'wget',
'FS',
'MEMFS',
'TTY',
'PIPEFS',
'SOCKFS',
'_setNetworkCallback',
'tempFixedLengthArray',
'miniTempWebGLFloatBuffers',
'heapObjectForWebGLType',
'heapAccessShiftForWebGLHeap',
'GL',
'emscriptenWebGLGet',
'computeUnpackAlignedImageSize',
'emscriptenWebGLGetTexPixelData',
'emscriptenWebGLGetUniform',
'webglGetUniformLocation',
'webglPrepareUniformLocationsBeforeFirstUse',
'webglGetLeftBracePos',
'emscriptenWebGLGetVertexAttrib',
'writeGLArray',
'AL',
'SDL_unicode',
'SDL_ttfContext',
'SDL_audio',
'SDL',
'SDL_gfx',
'GLUT',
'EGL',
'GLFW_Window',
'GLFW',
'GLEW',
'IDBStore',
'runAndAbortIfError',
'ALLOC_NORMAL',
'ALLOC_STACK',
'allocate',
'grow'
]
}
},
Expand Down

0 comments on commit 1fb08a6

Please sign in to comment.