Vite plugin that provides Internet Computer Canister Dapp configuration for development
Features:
Development-only operation (does nothing in production)
Loads configuration from VITE_ prefixed environment variables
Serves configuration at /canister-dashboard-dev-config.json during development
Emits canister-dashboard-dev-config.json as static asset during development builds
Automatic server proxy setup for IC development
/api -> proxied to ${VITE_DFX_PROTOCOL}://${VITE_DFX_HOSTNAME}:${VITE_DFX_PORT}
/canister-dashboard -> proxied to ${VITE_DFX_PROTOCOL}://${VITE_DFX_HOSTNAME}:${VITE_DFX_PORT}/canister-dashboard?canisterId=${VITE_CANISTER_ID}
/.well-known/ii-alternative-origins -> proxied to ${VITE_DFX_PROTOCOL}://${VITE_DFX_HOSTNAME}:${VITE_DFX_PORT}/.well-known/ii-alternative-origins?canisterId=${VITE_CANISTER_ID}
Note: The last two proxy rules are only set if VITE_CANISTER_ID is provided
Note: Existing user-defined proxy rules for these paths will not be overwritten
Required environment variables:
VITE_II_CANISTER_ID // Internet Identity canister ID in dfx
Vite plugin that provides Internet Computer Canister Dapp configuration for development
Features:
/canister-dashboard-dev-config.json
during developmentcanister-dashboard-dev-config.json
as static asset during development builds/api
-> proxied to${VITE_DFX_PROTOCOL}://${VITE_DFX_HOSTNAME}:${VITE_DFX_PORT}
/canister-dashboard
-> proxied to${VITE_DFX_PROTOCOL}://${VITE_DFX_HOSTNAME}:${VITE_DFX_PORT}/canister-dashboard?canisterId=${VITE_CANISTER_ID}
/.well-known/ii-alternative-origins
-> proxied to${VITE_DFX_PROTOCOL}://${VITE_DFX_HOSTNAME}:${VITE_DFX_PORT}/.well-known/ii-alternative-origins?canisterId=${VITE_CANISTER_ID}
Note: The last two proxy rules are only set if VITE_CANISTER_ID is provided Note: Existing user-defined proxy rules for these paths will not be overwrittenRequired environment variables:
Optional environment variables: