for anybody else having this issue: might be worth noting that the latest version of html-loader will break with "getOptions is not a function" messages when running wrangler preview --watch. I have found installing "html-loader": "1.0.0-alpha.0" and clearing out node_modules, and removing yarn.lock, works. Edit: what is the 2021 solution to the above problem?
@@JoelCodes html-loader version 2 needs webpack v5, Wrangler's built-in webpack is v4, if you want to use webpack v5 you can use custom builds in your wrangler.toml. here's a guide for how to setup custom builds. developers.cloudflare.com/workers/cli-wrangler/configuration#build
Short and sweet, exactly what I've been looking for. I have a bunch of unused domain names and was looking for a free hosting plan to create parking pages for them. This looks perfect!
You know, that's a really good question. I don't know the answer to that. Their example shows the router being created on each handle of request. It seems like it would be more efficient outside. My guess is optimization wouldn't improve the response times. More testing is required.
@@JoelCodes Let's say that you're getting 10 requests in parallel, then you're creating 10 routers at the same time. How does it go for scale? Although, more testing is indeed required since I don't know how many workers are being spawned and how many requests are given to each worker.
for anybody else having this issue:
might be worth noting that the latest version of html-loader will break with "getOptions is not a function" messages when running wrangler preview --watch.
I have found installing "html-loader": "1.0.0-alpha.0" and clearing out node_modules, and removing yarn.lock, works.
Edit: what is the 2021 solution to the above problem?
That is interesting to know. Let me know if you find a better solution to this.
@@JoelCodes html-loader version 2 needs webpack v5, Wrangler's built-in webpack is v4, if you want to use webpack v5 you can use custom builds in your wrangler.toml.
here's a guide for how to setup custom builds.
developers.cloudflare.com/workers/cli-wrangler/configuration#build
Any idea of solving this issue?
Thank you!
any idea how to solve the html loader issue?
Short and sweet, exactly what I've been looking for. I have a bunch of unused domain names and was looking for a free hosting plan to create parking pages for them. This looks perfect!
Ya I am really liking cloudflare workers. Highly recommend them!
Great videos! More Cloudfare Worker videos please :D
I'm working on them as we speak! I recently moved and it has been taking up all my free time. But they'll be coming again soon!
Cheers 🍻
Very high quality
Thanks! Much appreciated!
Really cool!
It definitely is! I'm pretty excited for the Cloudflare Workers platform.
Good
Cheers 🍻
You probably don't want to re-create the router every time a request comes right?
You know, that's a really good question. I don't know the answer to that. Their example shows the router being created on each handle of request. It seems like it would be more efficient outside. My guess is optimization wouldn't improve the response times. More testing is required.
@@JoelCodes Let's say that you're getting 10 requests in parallel, then you're creating 10 routers at the same time. How does it go for scale? Although, more testing is indeed required since I don't know how many workers are being spawned and how many requests are given to each worker.
@@SriHarshaChilakapati I'm with you on this. Makes total since. Definitely have to test this.
@@JoelCodes Would love to see testing these things in your future videos.
@@SriHarshaChilakapati I'll keep that in mind. I have two more videos planned for Cloudflare Workers. I'll have to think of some more after those.