pmndrs / valtio

🧙 Valtio makes proxy-state simple for React and Vanilla
https://valtio.dev
MIT License
9.16k stars 257 forks source link

v1.0.7 not loading as es6 module #173

Closed DynamicArray closed 3 years ago

DynamicArray commented 3 years ago

For previous versions, this worked:

<script type="module">
    import valtio from 'https://cdn.skypack.dev/valtio';
</script>

Since v1.0.7, that's failing.

dai-shi commented 3 years ago

Previously, it was using cjs even if type="module", now it's properly using esm.

So, does this fix?

<script type="module">
    import * as valtio from 'https://cdn.skypack.dev/valtio';
</script>
DynamicArray commented 3 years ago

Perfect. Thank you!