New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having handler file anywhere but root fails #839
Comments
Could you share a minimal config with |
@j0k3r yeah sure no problems
but if I remove |
I've created a minimal repro too and I do not have errors. service: test
provider:
name: aws
region: eu-west-1
runtime: nodejs12.x
stage: ${opt:stage, 'dev'}
versionFunctions: false
plugins:
- serverless-webpack
functions:
hello:
handler: handlers/handler.hello
custom:
webpack:
packager: yarn
keepOutputDirectory: true const path = require('path');
const slsw = require('serverless-webpack');
module.exports = {
entry: {
hello: "./handlers/handler.js"
},
mode: slsw.lib.webpack.isLocal ? "development" : "production",
target: 'node',
module: {},
output: {
libraryTarget: 'commonjs',
path: path.resolve(__dirname, "dist"),
filename: '[name].js'
},
resolve: {
modules: [ 'node_modules' ],
extensions: [".js"]
},
}; The packaging is ok
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a Bug Report
Description
I tend to have my handler files in a folder off root eg:
/handlers/xx.js
When using this format with serverless-webpack would create an error:
dist/
being my output location for my bundling.handlers/
being the location of my handlersBut if I take my handlers out of the
handlers/
and put them same level as both myserverless.yml
&webpack.config.js
. Then all is honky dory 🕺Additional Data
The text was updated successfully, but these errors were encountered: