Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The main difference between Vite and CRA is the use of .jsx files instead of .js. Other than that, React development remains largely the same.

However, note that Here’s the vite.config.js file needs slight modifications from Wieruch’s example to work with our Kubernetes setup. Here’s the configuration for VegSpecDST-ECON:

Code Block
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [react()],
  server: {
    open: true,
    watch: {
      usePolling: true,
 
  },
    host: true, // needed for the Docker Container port mapping to work
    strictPort: true,
    port: 3000,
  },
  build: {
    outDir: '/usr/src/app/build',
  },
  assetsInclude: ['**/*.xlsx'],
});