{"action":"created","issue":{"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/305","repository_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack","labels_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/305/comments","events_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/305/events","html_url":"https://github.com/serverless-heaven/serverless-webpack/issues/305","id":283305522,"number":305,"title":"AWS-SDK Included in deployment package","user":{"login":"mzuniga84","id":6096618,"avatar_url":"https://avatars2.githubusercontent.com/u/6096618?v=4","gravatar_id":"","url":"https://api.github.com/users/mzuniga84","html_url":"https://github.com/mzuniga84","followers_url":"https://api.github.com/users/mzuniga84/followers","following_url":"https://api.github.com/users/mzuniga84/following{/other_user}","gists_url":"https://api.github.com/users/mzuniga84/gists{/gist_id}","starred_url":"https://api.github.com/users/mzuniga84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzuniga84/subscriptions","organizations_url":"https://api.github.com/users/mzuniga84/orgs","repos_url":"https://api.github.com/users/mzuniga84/repos","events_url":"https://api.github.com/users/mzuniga84/events{/privacy}","received_events_url":"https://api.github.com/users/mzuniga84/received_events","type":"User","site_admin":false},"labels":[{"id":698852254,"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/labels/issue/under-investigation","name":"issue/under-investigation","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-12-19T17:10:30Z","updated_at":"2017-12-20T15:46:00Z","closed_at":null,"author_association":"NONE","body":"\r\n\r\n aws-sdk is being included in my deployment package even after I set forceExclude in serverless.yml.\r\n\r\n* In my serverless.yml I have:\r\n ```\r\ncustom:\r\n  webpackIncludeModules: # enable auto-packing of external modules\r\n    forceExclude:\r\n      - \"aws-sdk\"\r\n```\r\n\r\n* In my webpack config file I have\r\n`externals: [nodeExternals()]`\r\n\r\n* When running the deploy process (sls deploy) my output looks like this:\r\n```\r\nServerless: Bundling with Webpack...\r\nHash: a35bbeb42d11a50e378b\r\nVersion: webpack 3.9.1\r\nTime: 872ms\r\n                           Asset     Size  Chunks             Chunk Names\r\n    functions/processor/index.js  39.5 kB       0  [emitted]  functions/processor/index\r\nfunctions/processor/index.js.map  61.8 kB       0  [emitted]  functions/processor/index\r\n   [0] ./functions/processor/index.js 7.28 kB {0} [built]\r\n   [1] external \"aws-sdk\" 42 bytes {0} [not cacheable]\r\n   [2] external \"clone\" 42 bytes {0} [not cacheable]\r\n   [3] external \"axios\" 42 bytes {0} [not cacheable]\r\n   [4] external \"bluebird\" 42 bytes {0} [not cacheable]\r\n   [5] ./functions/processor/lib/schemas/ingest.js 2.9 kB {0} [built]\r\n   [6] ./functions/processor/lib/parser-templates/default.js 26 kB {0} [built]\r\nServerless: Package lock found - Using locked versions\r\nServerless: Packing external modules: clone@^2.1.1, axios@^0.17.1, bluebird@^3.5.1\r\n```\r\n\r\n* In my package.json aws-sdk is a dev dependency:\r\n```\r\n\"devDependencies\": {\r\n    \"aws-sdk\": \"^2.162.0\",\r\n    \"babel-core\": \"^6.25.0\",\r\n    \"babel-loader\": \"^7.1.1\",\r\n    \"babel-plugin-transform-runtime\": \"^6.23.0\",\r\n    \"babel-polyfill\": \"^6.23.0\",\r\n    \"babel-preset-env\": \"^1.6.0\",\r\n    \"eslint\": \"^4.12.1\",\r\n    \"eslint-config-airbnb-base\": \"^12.1.0\",\r\n    \"eslint-plugin-import\": \"^2.8.0\",\r\n    \"serverless-plugin-tracing\": \"^2.0.0\",\r\n    \"serverless-webpack\": \"^4.1.0\",\r\n    \"webpack\": \"^3.9.1\",\r\n    \"webpack-node-externals\": \"^1.6.0\"\r\n  }\r\n```\r\n\r\nStill, somehow the package is making it into my deployment file\r\n\r\nAny help would be appreciated.\r\n\r\nThank you in advance\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/comments/353099049","html_url":"https://github.com/serverless-heaven/serverless-webpack/issues/305#issuecomment-353099049","issue_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/305","id":353099049,"user":{"login":"mzuniga84","id":6096618,"avatar_url":"https://avatars2.githubusercontent.com/u/6096618?v=4","gravatar_id":"","url":"https://api.github.com/users/mzuniga84","html_url":"https://github.com/mzuniga84","followers_url":"https://api.github.com/users/mzuniga84/followers","following_url":"https://api.github.com/users/mzuniga84/following{/other_user}","gists_url":"https://api.github.com/users/mzuniga84/gists{/gist_id}","starred_url":"https://api.github.com/users/mzuniga84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzuniga84/subscriptions","organizations_url":"https://api.github.com/users/mzuniga84/orgs","repos_url":"https://api.github.com/users/mzuniga84/repos","events_url":"https://api.github.com/users/mzuniga84/events{/privacy}","received_events_url":"https://api.github.com/users/mzuniga84/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T15:46:00Z","updated_at":"2017-12-20T15:46:00Z","author_association":"NONE","body":"@HyperBrain \r\n\r\nIt can be tricky to balance efficiency with performance. A solution could be to remove the package(s) specified right before bundling from the root node_modules. In this case if a dependency requires an specific version of the said package(s) they will still be included under their own node_modules"}}
{"actor":{"display_login":"mzuniga84"}}