Docs
API Reference
rasengan.config.js
Vite Options

Vite Options

As Rasengan.js is based on top of Vite you can pass some Vite options to the Rasengan config.

rasengan.config.js
import { defineConfig } from "rasengan";
 
export default defineConfig({
  vite: {
    // Vite options
  };
});

Vite Plugins

You can pass Vite plugins to the Rasengan config.

rasengan.config.js
import { defineConfig } from "rasengan";
import plugin1 from "plugin1";
import plugin2 from "plugin2";
 
export default defineConfig({
  vite: {
    plugins: [plugin1(), plugin2()];
  };
});

Vite OptimizeDeps

This option allows you to exclude some dependencies from the Vite build.

rasengan.config.js
import { defineConfig } from "rasengan";
 
export default defineConfig({
  vite: {
    optimizeDeps: {
      exclude: ["dependency1", "dependency2"];
      include: ["dependency3", "dependency4"];
    };
  };
});

Vite CSS

You can pass PostCSS plugins to the Rasengan config.

rasengan.config.js
import { defineConfig } from "rasengan";
 
export default defineConfig({
  vite: {
    css: {
      postcss: {
        plugins: [require("postcss-plugin")];
      };
    };
  };
});

Vite Build

You can pass external dependencies to the Rasengan config.

rasengan.config.js
import { defineConfig } from "rasengan";
 
export default defineConfig({
  vite: {
    build: {
      external: ["dependency1", "dependency2"];
    };
  };
});

Vite Resolve

You can pass alias to the Rasengan config.

rasengan.config.js
import { defineConfig } from "rasengan";
 
export default defineConfig({
  vite: {
    resolve: {
      alias: [
        {
          find: "@";
          replacement: "./src";
        }
      ];
    };
  };
});

To learn about more about aliases, check the Alias section in the Rasengan documentation.

Logo Image