jspm / jspm.org

jspm.org website
https://jspm.org
13 stars 17 forks source link

playground breaks console.info and console.debug #41

Closed trusktr closed 1 year ago

trusktr commented 1 year ago
<script type="module">
  console.info('foo') // error
</script>

<script type="module">
  console.debug('bar') // error
</script>

playground link

trusktr commented 1 year ago

A workaround is to place this at the top of your playground code:

<script>
  // Store the original console as a global variable before JSPM has a chance to override it on window.
  const console = window.console
</script>

playground link

[!Note] This stops JSPM's console from working, but you can look at the native console instead.

guybedford commented 1 year ago

Thanks for sharing, fixed in https://github.com/jspm/jspm.org/pull/42, will go out in the next release.