Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Vite Configuration and Add Docker Support #143

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

KennyDizi
Copy link

@KennyDizi KennyDizi commented Jan 1, 2024

Type

enhancement, other


Description

  • Updated Vite to version 5.0.10 and switched to @vitejs/plugin-react-swc for better performance and compatibility.
  • Adjusted Vite server configuration to listen on host 0.0.0.0 and port 3000.
  • Added Docker support with a Dockerfile and docker-compose.yml for containerization and orchestration.
  • Updated the start script in package.json to use the --host flag for compatibility with Docker.
  • Included new development dependencies @swc/cli and @swc/core for SWC support.
  • Updated the README with Docker Compose instructions.

PR changes walkthrough

Relevant files                                                                                                                                 
Enhancement
4 files
vite.config.js                                                                                           
    vite.config.js

    **- Updated the Vite configuration to use
    @vitejs/plugin-react-swc instead of
    @vitejs/plugin-react.

    • Configured the server to run on
      host 0.0.0.0 and port 3000.
    • Adjusted the order of
      plugins, moving reactRefresh to the end of the plugins
      array.**
+6/-2
package.json                                                                                               
    package.json

    **- Upgraded vite to version 5.0.10 and vite-plugin-svgr
    to version 4.2.0.

    • Replaced @vitejs/plugin-react with
      @vitejs/plugin-react-swc version 3.5.0.
    • Added
      @swc/cli and @swc/core to devDependencies.
    • Modified
      the start script to include the --host flag.**
+6/-4
Dockerfile                                                                                                   
    Dockerfile

    **- Added a Dockerfile to containerize the application.


    • Set up a multi-stage build process to install dependencies
      and copy source code.
    • Exposed port 3000 and specified
      the command to run the application.**
+21/-0
docker-compose.yml                                                                                   
    docker-compose.yml

    **- Added a docker-compose.yml file to define and run the
    application as a Docker service.

    • Configured the service to
      build the Docker image, map port 3000, and use a custom
      network.**
+13/-0
Documentation
1 files
README.md                                                                                                     
    README.md

    - Updated the README with instructions on how to run the
    application using Docker Compose.

+6/-0

@KennyDizi KennyDizi changed the title [Feature] Update vite and offer docker Enhance Vite Configuration and Add Docker Support Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant