-
Notifications
You must be signed in to change notification settings - Fork 335
"javascript" worker site is still using webpack #1321
Comments
Came across this issue: Would it be possible to remove these lines? My script has a custom static asset handler, I only need wrangler to do the KV portion of site publishing. |
ooooooo - now i see why it would do this. We use webpack for Workers Sites because the worker itself imports packages and we need to combine those packages into a single script. I can totally see how this is confusing and I don't think we document this anywhere. That being said I don't think there's any way to get it to not use webpack for Workers Sites given the constraints. cc @ashleymichal - would love your thoughts on this one |
your use case is interesting though - i guess if you have your own custom static asset handler it feels like it should be possible to override... |
i'm going to pull this under the wrangler build milestone, since it's again about giving control to users over their build. i'll be writing an RFC for that this week. |
If you document what to include and add the option "type": "raw" users can have whatever crazy pipeline they want and include the needed files them selfs. |
As a workaround I've created a CLI for local development of workers using headless chrome to simulate the workers runtime. It supports sites, HTMLRewriter, the cache, etc. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This should remain open |
Closed by #1833 |
🐛 Bug Report
I'm using the
javascript
type in my wrangler.toml but wrangler still runs webpack on my script.There are similar issues where folks from Cloudflare have stated this would be a bug:
#1287 (comment)
Environment
Steps to reproduce
wrangler publish
results in the following output:A new folder is added under my existing
./packages/worker
folder. The new folder is calledworker
and contains a single file,script.js
with what appears to be the result of webpacking mypackages/worker/dist/index.js
file.I expected wrangler to publish my
packages/worker/dist/index.js
file as-is, and not create a new folder.The text was updated successfully, but these errors were encountered: