-
Notifications
You must be signed in to change notification settings - Fork 417
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
Include files and directories while preserving its permissions. #205
Comments
The feature can be part of the 3.1.0 feature release. |
I've set the official release date for |
Is there any solution as of today to include static files while waiting for the official support? That seems to be a blocking issue for me. |
@pierreis If you do not need exact permission replication but only want to add arbitrary files you can either use the webpack
The |
I reiterated over this again. If we'd add a |
@serverless-heaven/serverless-webpack-contributors Any ideas out there? |
@HyperBrain |
For files that do not need a replication of the permissions (e.g. executable persmission) in the target the existing webpack plugins like BTW: I'm not aware that you could tweak the webpack copy files plugin to copy permission accordingly, or is there a way to do that? |
So that's what I was missing 😃 I don't know any of these two plugins, but to be honest I always tend to try to contribute with existent projects (those plugins two plugins in this case) before creating a new one. |
Yes, you're absolutely right. I'd go for the |
@HyperBrain |
That's the project I was taking a look.
|
Ok. That's bad. (1) could be at least a workaround short-term if the PR behaves as expected. But mid-term that's not really a solution. If it is not maintained anymore - as it is a really useful plugin - it would be a solution to ask the current owner and try integrate it into serverless-heaven to be able to maintain it further (if the owner would agree and if there is anyone willing to drive the project as maintainer). If that's not feasible we need a different solution for our problem 🤔 |
BTW: They already have a transfer branch with an open PR to change the license. |
@HyperBrain Guys from https://github.com/webpack-contrib/ wants to maintain it |
Good find 👍 . Maybe the best way would be to continue with the current working workarounds (see above) and wait for the transition to be finished. |
I think so. |
Closing this task now - we'll wait for If anyone wants to continue the discussion here feel free to do so. That the issue is closed has no impact on that. |
It seems like the wait could be very long.. Is it an option to just fork |
I'm personally against forking it into But what I see as an option is, that someone temporarily forks it to his personal GitHub account, merges necessary stuff and we tell people to use that in the meantime. What do you think? |
That makes sense. I'll fork it and will apply the changes. I will comment here when it's done. |
There is still a lot to do, but this is the forked plugin: webpack-plugin-copy Any pull requests are welcome. I'll do my best to actively maintain the package. |
I have an issue where the resulting binary is packaged into every single function, whereas I only want it to packaged into the function where I use it. Unfortunately there is no way to But it is also present in create, get, list, etc. functions. This is my webpack.config.js:
And in my serverless.yml I have defined:
Any way to specify for which functions it should be packaged? Preferably I would use |
@tommedema Yes, you're right. The copy plugin will stupidly copy anything to each compile artifact because it just bypasses webpack's dependency detection. As it is just a single file the Otherwise as a last resort the plugin could be extended to support per function includes (like the module forced include we currently have per service). But I'm not really sure if that works. Another crazy idea would be that you use the |
@HyperBrain best solution seems to be to fork |
As a work around for this issue I was able to use the
|
This is a Feature Proposal
Description
Including a static file or directory and preserving its original file permissions. This would be particularly useful for including binaries in the final package.
Currently the only way that I am aware of to do this, is to run a shell script that copies the files into the
.webpack
folder before the bundling process. But maybe this functionality can be included in this plugin.The text was updated successfully, but these errors were encountered: