hisusqristos / karpet

domestic carpets via domestic wave function collapse
0 stars 0 forks source link

Ordering issue #2

Closed hisusqristos closed 1 year ago

hisusqristos commented 1 year ago

TL;DR: Im changing outfile to outDir to use comfortable modules

setting outFile in tsconfig.json was an experimental thing to do. outFile works with limited modules (None, System, Amd). Here we use None which means there is no import/export/require methods to grab variables from vneshni mir. you can reference those variables and vsyo, no red underlines. But the ordering is messed up. you define variable x in file AAA.ts then try to use it in index.ts and get

Block-scoped variable 'x' used before its declaration.

haskacaq? petqa mi hat el dnes hertakanutyuny mtaces.

hisusqristos commented 1 year ago

tho i struggle with choosing modules. is commonJS ok?

antaranyan commented 1 year ago

CommonJS might be ok, but struggle is not.

antaranyan commented 1 year ago

There was a long evolution of how we put JS in web page to work.

Evan You, creator of Vue.js and many other things, gave a nice presentation of the history, arriving why they built Vite for front-end tooling.

Watch here https://www.youtube.com/watch?v=Znd11rVHQOE&t=985s

P.S. you might not need to use Vite, it's still interesting quick recap of last 10-20 years of using JS in browsers.