hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.13k stars 255 forks source link

switch to vite #249

Closed micuat closed 11 months ago

micuat commented 1 year ago

corresponding https://github.com/hydra-synth/hydra-synth/pull/143

micuat commented 1 year ago

src issue - somehow js-beautify is overriding var src. But even when I comment out this line in editor.js

https://github.com/hydra-synth/hydra/blob/main/frontend/web-editor/src/views/editor/editor.js#L12

https://github.com/hydra-synth/hydra/blob/main/frontend/web-editor/src/views/editor/editor.js#L84

src object is still assigned to something else - this case BoundFunctionObject.

micuat commented 1 year ago

it's kind of weird because for example render is a bound function, but src as a bound function doesn't work, perhaps overrode by something not hydra

micuat commented 1 year ago

at least this will fix beautify's contamination

let beautify_js
{
  beautify_js = import("js-beautify").js_beautify
}
micuat commented 1 year ago

the other src value seems to come from vite's polyfill... which you can disable here, but then I get parent is undefined error from the sandbox again

https://vitejs.dev/config/build-options.html

edit: I think this was completely irrelevant