CDN link for browser.
Opened this issue · 6 comments
Hello. Is there a CDN link for devs who don't use node js? What if someone wants to create a browser app in the browser. No server side. does this still work?
Hi @webdev3301, the package is meant to be used in the browser. But it needs to be used with a bundler like webpack.
If you want to avoid that you could use an online service like JSPM which does the bundling for you.
<script type="module">
import { setTimeout } from 'https://dev.jspm.io/npm:worker-timers';
setTimeout(() => console.log('hello'), 1000);
</script>
Ahhh... webpack. Hard pass.
Yeah, I know it's not everyone's favorite tool. Does using JSPM as shown in the example above work for you?
I'm looking for also a simple JS minified link to import as <script src....></script>
pure JS is the best for me.
Any hope for simple <script src="worker-timer.js"></script>
version?
I made something. Hope, this will help some folks.
https://github.com/PLTytus/worker-timers-cdn