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

Can't use the new slsw.lib.entries with typescript #165

Closed
kikar opened this issue Jul 27, 2017 · 3 comments · Fixed by #167
Closed

Can't use the new slsw.lib.entries with typescript #165

kikar opened this issue Jul 27, 2017 · 3 comments · Fixed by #167
Labels
Milestone

Comments

@kikar
Copy link
Contributor

kikar commented Jul 27, 2017

This is a Bug Report

Description

slsw.lib.entries returns an object with keys name.js, and as values the string ./name.js.
This is making developing with typescript quite difficult:

  1. The key shouldn't have an extension in case i'm using an output name like [name].[hash].js, or in case I actually want a different extension.
  2. The value should't have an extension as well, so I can actually input typescript files

Additional Data

  • Serverless-Webpack Version you're using: 2.1.0
@HyperBrain HyperBrain added the bug label Jul 27, 2017
@HyperBrain
Copy link
Member

HyperBrain commented Jul 27, 2017

The values are the actual handler files that are the entry points defined by your service, which are determined by the Serverless service. I agree that, if you have a TS handler, it should point to the ts file and should not stupidly append .js to the handler base file name, but check for the file itself and set the correct path to the actual file (ts, js or something else) as value. This should be done automatically by the plugin.

The keys should behave the same -> if you are using ts the key should end with ts. As a user you know what your service configuration is, so it will then be quite easy to replace it via regex if you want a non-standard special behavior.

After some thinking, the keys should not add the extension, because of the filename modification you mentioned above.

@kikar
Copy link
Contributor Author

kikar commented Jul 27, 2017

👍🏻 Going to edit my pull request

@kikar
Copy link
Contributor Author

kikar commented Jul 27, 2017

@HyperBrain opened a PR, could you help me with the documentation?

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

Successfully merging a pull request may close this issue.

2 participants