Skip to content
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

Change in v0.10.2 that causes output directory to first be removed breaks my build #1099

Closed
zzzachzzz opened this issue Dec 27, 2021 · 3 comments · Fixed by #1110
Closed

Comments

@zzzachzzz
Copy link

In reference to this change which causes the output directory to first be removed: #986 (review)

While I understand this may be intended behavior, I thought I'd share my use case that illustrates why my build is dependent on files already residing in the output pkg folder, files which are tracked in git.

I have a .gitignore that looks like this:

pkg/*
!pkg/index.ts
!pkg/insight.worker.ts
!pkg/insight.d.ts

As you can see, I keep some essential files tracked by git in the pkg folder, and these modules then reference the output files generated by wasm-pack. Maybe there's a better way for me to go about this? Such as copying the files into pkg as part of the build process, or perhaps I should keep these files outside of the pkg folder, and reference the build output that goes into pkg.

If it is decided to keep this change, please add it to the v0.10.2 changelog.

@huntc
Copy link
Contributor

huntc commented Feb 9, 2022

We are also seeing this problem introduced with 0.10.2 and in conjunction with webpack. Webpack is watching the files in the pkg folder and seems to go into a panic, and is unable to recover until we restart its watching.

@zzzachzzz Did you manage to overcome this somehow?

@huntc huntc mentioned this issue Feb 9, 2022
3 tasks
@zzzachzzz
Copy link
Author

@huntc My temporary solution is to lock wasm-pack @ 0.10.1, installing via npm

@huntc
Copy link
Contributor

huntc commented Feb 16, 2022

Fixed by my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants