Specifying a path to the package.json
See original GitHub issueHi 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to specify the path of `package.json` to npm?
I use npm scripts to build my project. I'd like to be able to run the scripts from a different directory. That is,...
Read more >package.json - npm Docs
Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which...
Read more >Specifying paths in package.json · Issue #1479 - GitHub
I know I can add a path for each file, but that's not what I want to do. There are lots of files,...
Read more >Modules: Packages | Node.js v19.3.0 Documentation
In a package's package.json file, two fields can define entry points for a package: "main" and "exports" . Both fields apply to both...
Read more >package.json - Tutorial - Vskills
The package.json file is normally located at the root directory of a Node.js project. Node itself is only aware of two fields in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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. thanksI’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.