This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.
This project is configured for deployment to AWS Amplify Hosting.
- AWS Account
- AWS CLI configured with appropriate credentials
- @aws-amplify/cli installed globally
-
Initialize Amplify project:
cd line-mini-app amplify initFollow the prompts:
- Enter a name for your environment:
prod - Choose your default editor:
Visual Studio Code - Select the AWS region:
ap-northeast-1(Tokyo) - Choose the type of app that you're building:
javascript - What JavaScript framework are you using:
react - Source directory path:
src - Distribution directory path:
dist - Build command:
npm run build - Start command:
npm run dev
- Enter a name for your environment:
-
Add hosting:
amplify add hosting
Select:
- Hosting with Amplify Console:
No - Amazon S3 and Amazon CloudFront:
Yes
- Hosting with Amplify Console:
-
Deploy:
amplify publish
For automatic deployments:
- Push your code to a Git repository (GitHub, GitLab, Bitbucket)
- Sign in to AWS Amplify Console
- Connect your repository
- Amplify will automatically detect the build settings from
.amplify-hosting/config
-
Push code to Git repository:
git init git add . git commit -m "Initial commit" git remote add origin https://github.com/yourusername/line-mini-app.git git push -u origin main
-
Connect to Amplify Console:
- Sign in to AWS Amplify Console
- Click "New app" → "Connect app"
- Select your Git provider and repository
- Click "Next"
-
Configure build settings:
- Build settings will be auto-detected from
.amplify-hosting/config - Verify:
- Build command:
npm run build - Base directory:
/
- Build command:
- Click "Next"
- Build settings will be auto-detected from
-
Review and deploy:
- Review all settings
- Click "Save and deploy"
- Amplify will provision S3 bucket and CloudFront distribution
-
Custom domain (optional):
- Go to "Domain management" in Amplify Console
- Add your custom domain
- Amplify will automatically configure SSL certificate
For LINE Mini App integration, configure your liffId in the environment:
# In amplify/backend.ts or environment variables