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

Specifying a path to the package.json #80

Closed
jayair opened this issue Dec 4, 2020 · 5 comments
Closed

Specifying a path to the package.json #80

jayair opened this issue Dec 4, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request released

Comments

@jayair
Copy link

jayair commented Dec 4, 2020

Hi there,

I was testing this plugin out and ran into some issue. We have a monorepo setup where the individual services do not have their own package.json. I noticed that this plugin uses the code from serverless-webpack. Any plans to add the ability to set your own path for the package.json? Or alternatively, climbing up the directories to look for a package.json file?

https://github.com/serverless-heaven/serverless-webpack/blob/31662103851933ac277b02119912b593c2914ece/lib/packExternalModules.js#L242 => https://github.com/floydspace/serverless-esbuild/blob/master/src/packExternalModules.ts#L151

@floydspace
Copy link
Owner

Hi @jayair . thank you for the issue
yes, it does make sense to add packagePath option.
I will work on it

@floydspace floydspace added the enhancement New feature or request label Dec 5, 2020
@floydspace floydspace self-assigned this Dec 5, 2020
@paulswail
Copy link

paulswail commented Dec 8, 2020

I'm using a monorepo with a single root package.json and have hit the same issue. My preference would be for the default behaviour to be to climb up directories until it finds a package.json file like the serverless-webpack plugin does without requiring an explicit configuration setting.

@floydspace
Copy link
Owner

🎉 This issue has been resolved in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@floydspace
Copy link
Owner

floydspace commented Dec 11, 2020

@jayair @paulswail hey guys, I added an optional packagePath parameter which indicates the absolute path to the package.json file to be used for packaging, if it is omitted, the package.json will be found walking up folders.
Please let me know if you have any issues. thanks

@jayair
Copy link
Author

jayair commented Dec 16, 2020

@floydspace That's awesome. Thanks for quick response. I'll give it a test shortly. And we'll be promoting this plugin ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

3 participants