-
Notifications
You must be signed in to change notification settings - Fork 337
Duplicate output files: dist/main.js and workers-site/worker/script.js #1046
Comments
I can confirm that |
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. |
Meet the same problem. Hope it can be fix soon. |
did you mean to say that i am wondering in the meantime is it possible to configure webpack config so that output of both files go to single directory, eg |
For the current version of wrangler (v1.12.2):The default output file seems to have changed to I guess it would be alright to customize the default
However, I could never figure out why the 2 files are created in 2 different places but with the same content: |
closed by #1833 (since you can use custom builds to avoid this) |
🐛 Bug Report
I recently created a workers site, and was looking through the generated files to decide what was temporary and what to commit. I noticed that there were two identical files:
dist/main.js
workers-site/worker/script.js
I spent some time trying to figure out why both existed, and which was the original vs duplicate. From what I can tell,
dist/main.js
is the webpack output, and the other file is a duplicate of it. It seems that at one point, both files existed because some other code was prepended to the webpack output before it was written toworker/script.js
, but this appears to no longer be the case. It seems to have been removed in e7416ff. Seeing as the two files are redundant and slightly confusing, maybe webpack should be configured to output directly toworker/script.js
or something instead. The current process seems to have caused #681 as well.Environment
rustc -V
: not installednode -v
:v8.10.0
wrangler -V
:wrangler 1.7.0
(Unrelated: it seems maybe wrangler inserts a space before the version string by accident?)The text was updated successfully, but these errors were encountered: