Dan Coates
11/18/2021, 10:15 PMsst start
with an api with multiple routes defined that the code will only rebuild if I change the handler file referenced in the route config, not if I change a file imported by the handler.
ie. if I have config like this:
const api = new sst.Api(this, 'Api', {
routes: {
'GET /route1': `route1.handler`,
'GET /route2': `route2.handler`,
'GET /route3': `route3.handler`,
'GET /route4': `route4.handler`,
}
});
and all of those handlers import a config.ts
file or something, saving config.ts
won't cause any of them to rebuild.
Is this a known issue?Dan Greaves
11/18/2021, 10:32 PMFrank
config.ts
?Dan Coates
11/18/2021, 11:40 PMimport config from './config'
style imports, nothing fancy or dynamic.
That said, I actually can't replicate this right at the moment though it was happening consistently yesterday. I'll keep an eye on it and let you know if I get a clearer idea of when/why it is happening...Frank
config.ts
a newly added file?Frank
Dan Greaves
11/20/2021, 8:29 AMsst start
is running, it doesn’t get watched. Also explains why @Dan Coates’s project suddenly didn’t have the issue (because he would have restarted sst start
)!Dan Coates
11/21/2021, 9:48 PMFrank