-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect example for CF Workers #10
Comments
You need to make sure you're compiling for ES modules I'm not sure what the state of wrangler is these days for compilation. It looks from the docs like you might need to set I just use rollup in the example: https://github.com/mhart/aws4fetch/tree/master/example#bundling-and-deploying |
You are right: setting type to webpack works. I think you'd better clarify it in the example. |
The example doesn't mention wrangler though. The example should work just as documented |
I've proposed #11, please see. |
I am new to CF Workers so decided to first create an issue rather than creating a PR with changes to docs. When I try to run your example I get:
SyntaxError: Cannot use import statement outside a module
I have tried running it with
wrangler preview
and only have seen en example.com page without any activity from my worker. Same forwrangler dev
. Am I doing it right and is the problem correctly stated?The text was updated successfully, but these errors were encountered: