-
Create node_modules folder by executing the following command in
src/
npm install
-
Make changes to the source code in
src/src
. -
Create build folder in
src/
by executing the following command.
npm run build
-
After creating build folder, follow inside the folder and remove the _redirects file.
-
Replace the build folder in
resources/s3/webfiles/
-
Copy the index.html file from
resources/s3/webfiles/build
toresources/lambda/react
and run the following commands on it. On MacOS,-i
might not be required for the following command.
sed -i 's,href="/,href="S3_BUCKET/,g' index.html
sed -i 's,src="/,src="S3_BUCKET/,g' index.html
-
Replace S3_BUCKET in index.html file located in
resources/lambda/react
-
Run the terraform apply action.