0

So...I am modifying sql.js. In this project I am trying to export a function / object I created and somehow the name gets minified when I compile with emcc

The Database that sql.js exports does not get minified. How might I be able to modify this project such that my object name does not get modified and I can use it later?

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
ovatsug25
  • 7,786
  • 7
  • 34
  • 48
  • 1
    I'm not sure I understand what you mean. Do you want to be able to access a variable you declared inside a JavaScript file from anywhere else in the browser, but it's getting minified? A quick fix would be `window.myVariable = ...` and access it like `myVariable` from anywhere. – code Mar 15 '22 at 00:50
  • @Bergi - yes, EMCC - https://emscripten.org/docs/tools_reference/emcc.html – ovatsug25 Mar 15 '22 at 02:47
  • @code - I tried declaring variables outside, but the compiler is very strict – ovatsug25 Mar 15 '22 at 02:48

0 Answers0