require('aws-sdk'); but when i run
npm run deploy this show error log
CF-Worker script size limit exceeded (1694KB) can someone help me?
I’m afraid the webpack file is turning up to over 1.7MB with that included. Maybe there is some webpack config that selectively includes parts of that module? (Not sure, my only experience with webpack is laravel mix).
i have some test and success on nodejs, just require what we need.
// import entire SDK
//var AWS = require(‘aws-sdk’);
// import AWS object without services
var AWS = require(‘aws-sdk/global’);
// import individual service
var S3 = require(‘aws-sdk/clients/s3’);
building original js 650KB and 230KB minified. But i have new issue.
[code 10021]: Uncaught ReferenceError: global is not defined
Uncaught ReferenceError: global is not defined at line 1609 at line 20 in __webpack_require__ at line 3620 at line 20 in __webpack_require__ at line 13350 at line 20 in __webpack_require__ at line 13302 at line 20 in __webpack_require__ at line 3426 at line 20 in __webpack_require__
maybe @detroitenglish or @KentonVarda @harris can help me.