Wrangler: change Wrangler build directory

Created on 3 Jun 2019  路  8Comments  路  Source: cloudflare/wrangler

Currently the built worker end up in ./worker. However, that directory could be used by the user.

I would suggest to hide the directory, it's useful for debugging but not for the user.

question status - needs design

Most helpful comment

Agreed. I wouldn't be surprised if people defaulted to using worker/ as the workspace for their Workers in larger projects: can we just do .build or something similar?

(Note that whatever change we do will involve some changes to the various templates: they all generally have worker/ in .gitignore)

All 8 comments

Agreed. I wouldn't be surprised if people defaulted to using worker/ as the workspace for their Workers in larger projects: can we just do .build or something similar?

(Note that whatever change we do will involve some changes to the various templates: they all generally have worker/ in .gitignore)

Yes, if I remember correctly even a template uses worker for user code.

Using .build instead sounds good to me. Also using the os tempdir would make sense to me, I don't expect the user to commit them.

People using dollarshaveclub/cloudworker might want to use the output of the build, so maybe a public build directory is potentially a better option here.

Using 1.8.1 I am noticing the same file created in dist/ and worker/ and haven't tracked down what is causing that behavior.

@johnelliott it's expected. One is webpack's output the other is wrangler's output

Yeah I saw #640

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 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tibotiber picture tibotiber  路  6Comments

PierBover picture PierBover  路  5Comments

matthew-petrie picture matthew-petrie  路  4Comments

nickbalestra picture nickbalestra  路  5Comments

ispivey picture ispivey  路  4Comments