Skip to content

Keep Compiled code in a dist folder #724

@swalker326

Description

@swalker326

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report 
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

I've created an alexa skill built in typescript and in trying to compile it to js and keep my sanity I wanted to set the entry point in package.json and enable to lambda function to be correctly routed to a different directory IE: /dist/index.js

Expected Behavior

Setting the main property in package.json to the location of my entry file would still allow the function to run.

Current Behavior

Changes to the main property seem to have no affect

Possible Solution

This could be something I'm doing wrong, or not a limitation of the sdk but of aws lambda functions themselves. I can't seem to find any information on the topic.

Steps to Reproduce (for bugs)

Create a sample skill and move your index.js file to a nested directory and update the package.json to reflect these changes.

Context

When trying to write a skill in typescript the root directory of the lambda function can become cluttered very quickly. I would like to have my *.ts files in a /src directory and my compiled *.js files in a /dist directory.

Your Environment

  • ask-sdk 2.12.1
  • Node v18.7.0
  • Mac OS Monterey

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions