# woo-vipps/6.2.4/payment/src/admin/settings/vite.config.ts

Pay with Vipps and MobilePay for WooCommerce, version 6.2.4. 36 lines.

- Page: https://pluginprobe.com/plugins/woo-vipps/6.2.4/code/payment/src/admin/settings/vite.config.ts
- Raw: https://pluginprobe.com/plugins/woo-vipps/6.2.4/raw/payment/src/admin/settings/vite.config.ts
- Modified: 2026-05-11T11:27:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/woo-vipps/6.2.4/code/payment/src/admin/settings/vite.config.ts#L10-L20`.

```typescript
import { defineConfig, esmExternalRequirePlugin } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react({
      // Disable automatic runtime injection 
      jsxRuntime: 'classic', 
    }),
    esmExternalRequirePlugin({
      external: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime'],
    }),


],
  build: {
    rolldownOptions: {
      external: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime'],
      output: {
        format: "iife", // or "umd"
        globals: {      // Ensure we can load react from WP
          react: 'wp.element',
          'react-dom': 'wp.element',
          'react-dom/client': 'wp.element',
          'react-dom/jsx-runtime': 'wp.element',
        },
        dir: '../../../admin/settings/dist',
        // Necessary to have a consistent output path, so it's easy to reference it when we call wp_enqueue_script().
        entryFileNames: 'plugin.js',
        chunkFileNames: 'chunk.js',
        manualChunks: undefined
      },
    }
  }
});

```
