You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is, when I run serverless package from the deployment directory, it creates a new directory server inside the deployment directory, which contains the webpacked code. I think it's resolving ../server from the desired .webpack directory, and "busting out" of the build folder.
I have an idea for a "quick fix": add a new rootDirectory option. When generating the filenames for the compiled output, resolve relative paths against rootDirectory instead of process.cwd(). For instance:
config:
webpack:
rootDirectory: '..'
This would cause ../server/handler1 to be resolved as ./server/handler1, which would allow the compiled output to be placed in the correct location. This solution is a bit inelegant, but it "does the trick" and can probably be implemented quickly.
Let me know if you want me to take a stab at it.
The text was updated successfully, but these errors were encountered:
My setup looks like this:
And
serverless.yml
:The problem is, when I run
serverless package
from the deployment directory, it creates a new directoryserver
inside the deployment directory, which contains the webpacked code. I think it's resolving../server
from the desired.webpack
directory, and "busting out" of the build folder.I have an idea for a "quick fix": add a new
rootDirectory
option. When generating the filenames for the compiled output, resolve relative paths againstrootDirectory
instead ofprocess.cwd()
. For instance:This would cause
../server/handler1
to be resolved as./server/handler1
, which would allow the compiled output to be placed in the correct location. This solution is a bit inelegant, but it "does the trick" and can probably be implemented quickly.Let me know if you want me to take a stab at it.
The text was updated successfully, but these errors were encountered: