I think I picked up a bug in the Api construct, th...
# sst
g
I think I picked up a bug in the Api construct, the bundle option does not seem to work here
Copy code
new Api(this, 'Api', {
      routes: {
        'ANY /any': {
          function: 'src/lambda/any.handler',
          bundle: {
            loader: {} // this does not seem to work
          }
        },
      },
    });
I get the desired functionality when I use
Copy code
const func new Function(this, 'Function', {
      handler: 'src/lambda/any.handler',
      bundle: { 
        loader: {} // it works here
      }
    });

new Api(this, 'Api', {
      routes: {
        'ANY /any': {
          function: func
        },
      },
    });
I haven't had time to debug this issue.
f
Hey @geekmidas, I’m taking a look.
In the first snippet you shared, instead of:
Copy code
function: 'src/lambda/any.handler',
          bundle: {
            loader: {} // this does not seem to work
          }
try:
Copy code
handler: 'src/lambda/any.handler',
          bundle: {
            loader: {} // this does not seem to work
          }