Q: static assets when using modules
See original GitHub issueHello, can someone please guide me on how I can serve a static asset when using modules?
What I want to achieve: I have a worker that returns some html strings, I want to now serve some .css
files so that I can use them in those html strings.
I’m using Miniflare v2 and if I’m understanding this correctly I need to setup a workers site, however I’m not entirely sure how to use getAssetFromKV
when using modules. The example is using the non-modules approach and looking at the npm package https://www.npmjs.com/package/@cloudflare/kv-asset-handler does have a modules version but it doesn’t play nicely with miniflare (eg: the __STATIC_CONTENT_MANIFEST
import).
Would appreciate any guidance 😄
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
App Handling Assets | Quasar Framework
So let's try to answer the question above. We'll first talk about using regular assets then we'll see what the difference is for...
Read more >Quasar assets vs statics directories - Stack Overflow
I am trying to understand the difference between assets and statics directories and when I should be using one or the other, especially...
Read more >gruntwork-io/static-assets/google - Terraform Registry
This repo contains modules for managing static assets (CSS, JS, images) in GCP. Quickstart. If you want to quickly launch a static website...
Read more >Chapter 7. Packages and Modules - Oracle Help Center
The import declarations allow types from packages in this module and other modules, as well as static members of types, to be referred...
Read more >Webpack: When To Use And Why - Andy Ray's Blog
If your application is fairly small, and you don't have many static assets and you only need to build one Javascript file to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@leader22 and @mrbbot thanks so much for your help. I got it working! 🕺 I wish I had more info on what I missed, but I basically started from scratch using both the test and @leader22’s example and worked as expected.
Thank you both so much, I really appreciate it!
FYI 🗞️
Finally I found that
Illegal invocation
error was my fault. I updated my repo,bypassCache: true
is not needed anymore.