LAMBDA_FUNCTION_NAME=MyFunction AWS_UPLOAD_CODE_PROFILE=MY_CLI_PROFILE SLACK_DEV_NOTIFICATIONS_WEBHOOK_URL=https://hooks.slack.com/services/****/****/****
# Read the .env file
These are the 35 root categories on Amazon.com.
Retrieved via Keepa API on April 12, 2021.
|By default, service workers cannot access our Vue environment variables.|
|To allow this, this script collects the variables we want at build time|
|and places them in a JS file that the service worker can access.|
|To prevent the leak of sensitive credentials (the SW file is public),|
|only whitelisted environment variables are built into this file.|
|Deploy this file alongside your service worker, and import th efile in your service worker (`importScripts('swenv.js');` in Workbox)|
By default, ZIPing the project directory will included all of your
devDependencies. slowing your upload speed to a crawl as you upload an enormous bundle containing 80% useless code (unless you're testing in production™ )
You only need your production dependencies when deploying, but need you
devDependencies for development. But you have to deploy from the same directory, and it must be named
node_modules. How can slim down the ol' deploy bundle?
Here's a horrible but effective hack that accomplishes this:
node_modules__prodfor storing production dependencies.
node_modulesbut actually is our production-only modules directory.