A custom Vite plugin to configure Vite's proxy for loading UI5 sources from Content Delivery Network (CDN).
All requests to /resources
and /test-resources
will be proxied to the configured CDN (default: https://ui5.sap.com).
npm install --save-dev @cpro-js/vite-ui5-resources-proxy-plugin
vite.config.ts
import { defineConfig } from "vite";
import viteUI5ResourcesProxyPlugin from "@cpro-js/vite-ui5-resources-proxy-plugin";
return defineConfig({
// ...
plugins: [
// ...
viteUI5ResourcesProxyPlugin({
version: "1.120.6",
url: "https://ui5.sap.com",
debug: false
}),
],
});
MIT - see License.