Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Problem with the copy of the include #232

Open
Eus32 opened this issue Aug 13, 2021 · 0 comments
Open

Problem with the copy of the include #232

Eus32 opened this issue Aug 13, 2021 · 0 comments

Comments

@Eus32
Copy link

Eus32 commented Aug 13, 2021

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @kingdarboja/[email protected] for the project I'm working on.

The issue is, as far as I know, is that the object serverless does not contain package but it is a property of service.

Here is the diff that solved my problem:

diff --git a/node_modules/@kingdarboja/serverless-plugin-typescript/dist/index.js b/node_modules/@kingdarboja/serverless-plugin-typescript/dist/index.js
index 15bc57a..e2aa2aa 100644
--- a/node_modules/@kingdarboja/serverless-plugin-typescript/dist/index.js
+++ b/node_modules/@kingdarboja/serverless-plugin-typescript/dist/index.js
@@ -198,8 +198,8 @@ class TypeScriptPlugin {
                 }
                 finally { if (e_1) throw e_1.error; }
             }
-            if ((_b = this.serverless.package) === null || _b === void 0 ? void 0 : _b.include) {
-                this.copyIncludes(this.serverless.package.include);
+            if ((_b = service.package) === null || _b === void 0 ? void 0 : _b.include) {
+                this.copyIncludes(service.package.include);
             }
             this.serverless.cli.log('Finished Copying Extras');
         });

This issue body was partially generated by patch-package.

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

No branches or pull requests

1 participant