DEV Community

Discussion on: Managing Multiple Functions with AWS SAM and Webpack

Collapse
 
martzcodes profile image
Matt Martz

For your resolve extensions... you list them in order of .js and then .ts... (which is the order that webpack looks for them in)... shouldn't you have .ts first?

I guess if you have a module with both .js and .ts extensions you have other problems anyways... so maybe it doesn't matter?

Collapse
 
elthrasher profile image
Matt Morgan

That would only matter if some directory had both js and ts, correct. I'm not supporting js because I think I might write some but because I'm webpacking node modules. In the unlikely event some module has both a js and ts file, I probably want to prioritize the js, as that's what the author intended.