跳至內容

Will aws handle transpiling for me?

0

I am using Vite for my React app which uses .jsx file extensions rather than .js - Apparently I need to transpile them into .js to run on browser - If I install a transpiler like Babel into my node package manager will aws handle the rest or is there more I need to set up?

已提問 3 年前檢視次數 80 次
1 個回答
0

5. CI/CD with AWS CodePipeline

you can use AWS CodePipeline to build and deploy your app.

  • Configure CodeBuild within your pipeline to run the npm run build command, ensuring your JSX files are transpiled.

Example of a buildspec.yml file for AWS CodeBuild:

version: 0.2

phases:
  install:
    commands:
      - npm install
  build:
    commands:
      - npm run build
artifacts:
  files:
    - '**/*'

6. Additional Setup

  • Ensure that your Vite project is properly configured for production builds, including optimizations and environment settings.

Official AWS Documentation:

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。