File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"dependencies" : {
3
+ "lodash" : " ^4.17.4"
4
+ },
5
+ "devDependencies" : {
3
6
"@types/lodash" : " ^4.14.63" ,
4
- "lodash" : " ^4.17.4" ,
5
7
"serverless-plugin-typescript" : " ^0.1.2"
6
8
}
7
9
}
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ class ServerlessPlugin {
91
91
fs . symlinkSync ( path . resolve ( 'node_modules' ) , path . resolve ( path . join ( buildFolder , 'node_modules' ) ) )
92
92
}
93
93
94
+ // include package.json into build so Serverless can exlcude devDeps during packaging
95
+ if ( ! fs . existsSync ( path . resolve ( path . join ( buildFolder , 'package.json' ) ) ) ) {
96
+ fs . symlinkSync ( path . resolve ( 'package.json' ) , path . resolve ( path . join ( buildFolder , 'package.json' ) ) )
97
+ }
98
+
94
99
// include any "extras" from the "include" section
95
100
if ( this . serverless . service . package . include && this . serverless . service . package . include . length > 0 ) {
96
101
const files = await globby ( this . serverless . service . package . include )
You can’t perform that action at this time.
0 commit comments