yysun / apprun

AppRun is a JavaScript library for developing high-performance and reliable web applications using the elm inspired architecture, events and components.
https://apprun.js.org
MIT License
1.18k stars 58 forks source link

global values created for ESM version #118

Closed tvardy closed 2 years ago

tvardy commented 3 years ago

https://github.com/yysun/apprun/blob/f16a53d8379c707b78341920d13140e490e66782/src/apprun.ts#L61-L66

becomes

https://github.com/yysun/apprun/blob/f16a53d8379c707b78341920d13140e490e66782/esm/apprun.js#L40-L45

I noticed that part accidentally while checking other things... I got surprised that even though I haven't imported the Component in a separate component file, the script was able to find a reference and interpret ... extends Component { without throwing an error.

I guest the ESM version shouldn't expose global variables... this should only show up in the dist

yysun commented 3 years ago

I agree.