@equinor/fusion-framework-vite-plugin-spa

中文文档
5.2.5发布于 2026/11/12ISCTypeScriptES Module近 30 天下载 9228

Vite plugin for SPA development

原始使用文档
文档目录29 节
  1. What It Does
  2. How the Plugin Works
  3. Getting Started
  4. Installation
  5. Minimal Vite Config
  6. Configuration Options
  7. Template Environment ( generateTemplateEnv )
  8. Portal Proxy
  9. Service Discovery
  10. MSAL Authentication
  11. Service Worker
  12. Telemetry
  13. Controlling Console Output
  14. Configuring through .env Files
  15. Naming Convention
  16. Mapping Example
  17. Complete .env Example
  18. Running Against a Mock Client (CI / Playwright)
  19. Advanced Customization
  20. Providing a Custom Template
  21. Providing Custom Bootstrap
  22. Examples
  23. Basic SPA with React
  24. Using with API Service Plugin
  25. Troubleshooting
  26. Common Issues
  27. Known Issues
  28. Best Practices
  29. Contributing

title: Fusion Framework Vite SPA Plugin description: > Vite plugin for building Fusion Framework Single Page Applications. Automates HTML template generation, MSAL authentication bootstrapping, service discovery wiring, portal manifest loading, and authenticated API proxying via a service worker. tags:

  • fusion-framework
  • vite-plugin
  • cli
  • app-development
  • portal-development
  • dev-server
  • authentication
  • service-discovery
  • service-worker
  • equinor
  • non-production keywords:
  • '@equinor/fusion-framework-vite-plugin-spa'
  • fusion-framework
  • vite
  • spa
  • plugin
  • development
  • non-production
  • msal
  • service-worker
  • portal

@equinor/fusion-framework-vite-plugin-spa

npm version License: ISC

Vite plugin for building Fusion Framework Single Page Applications (SPAs). It generates an HTML shell, bootstraps MSAL authentication and service discovery, loads a portal by manifest, and registers a service worker that injects Bearer tokens into outgoing API requests.

[!CAUTION] This plugin is intended for non-production development environments only.

[!WARNING] This plugin is designed for use with @equinor/fusion-framework-cli. The CLI scaffolds all required configuration automatically.

Standalone usage is an advanced scenario that requires deep understanding of the Fusion Framework internals. The documentation below covers the full configuration surface for those who need it.

What It Does

ResponsibilityDescription
Bootstrap the Fusion FrameworkInitializes MSAL authentication, service discovery, and telemetry modules
Render a configured portalFetches a portal manifest by ID and loads its entry point
Register a service workerIntercepts fetch requests, rewrites URLs, and attaches OAuth Bearer tokens
Configure the dev environmentWorks with @equinor/fusion-framework-vite-plugin-api-service to proxy authenticated requests during development

[!TIP] The portal to render can be sourced from:

  • A local npm package (e.g. @equinor/fusion-framework-dev-portal, the default used by CLI)
  • The Fusion Portal Service (using a portal identifier)
  • Any custom portal implementation that exports a render function

How the Plugin Works

flowchart
  A[Vite HTML request] -->|index.html| B[Plugin serve SPA]
  B -->|bootstrap.js| C[Initialize Fusion Framework]
  C --> D[Register Service Worker]
  C -->|"/portals/{portalId}@${portalTag}"| E[Fetch Portal Manifest]
  E -->|manifest.build.config| F[Fetch Portal Configuration]
  F -->|manifest.build.entrypoint| G[Import Portal Source]
  G -->|"Fusion Instance"| H[Render Portal]

  style A fill:#F00,stroke:#333,stroke-width:1px
  style H fill:#00F,stroke:#333,stroke-width:1px

Flow Explanation:

  1. Vite HTML Request: The plugin hooks into the Vite dev-server and intercepts SPA requests.
  2. Serve SPA: The plugin serves the SPA by returning the index.html file.
  3. Initialize Fusion Framework: bootstrap.js is loaded
    • configures the framework (e.g. MSAL, service discovery)
    • initializes the framework
    • registers service worker (connects to fusion framework)
  4. Fetch Portal Manifest: The framework fetches the manifest describing the portal to load.
  5. Fetch Portal Configuration: Additional configuration for the portal is retrieved.
  6. Load Portal Source File: The main entry file for the portal is loaded based on the manifest.
  7. Render Portal: Renders the portal with the Fusion Framework.

Getting Started

[!WARNING] This plugin is primarily designed to be used with the Fusion Framework CLI. The CLI scaffolds all required configuration and wiring automatically.

Standalone usage requires you to supply authentication, service discovery, portal loading, and service worker configuration yourself. See Configuration Options below.

Installation

pnpm add -D @equinor/fusion-framework-vite-plugin-spa

Minimal Vite Config

// vite.config.ts
import { defineConfig } from 'vite';
import { fusionSpaPlugin } from '@equinor/fusion-framework-vite-plugin-spa';

export default defineConfig({
  plugins: [
    fusionSpaPlugin({
      generateTemplateEnv: () => ({
        title: 'My App',
        portal: { id: 'my-portal' },
        serviceDiscovery: {
          url: 'https://my-server.com/service-discovery',
          scopes: ['api://my-app/scope'],
        },
        msal: {
          tenantId: 'my-tenant-id',
          clientId: 'my-client-id',
          redirectUri: 'http://localhost:3000/auth-callback',
          requiresAuth: 'true',
        },
      }),
    }),
  ],
});

Configuration Options

The fusionSpaPlugin (also exported as plugin) accepts a PluginOptions object with the following properties:

OptionTypeDefaultDescription
templatestringBuilt-in HTMLCustom HTML template string with %VAR% placeholders
templateEnvPrefixstring'FUSION_SPA_'Prefix for environment variable names
generateTemplateEnv(env: ConfigEnv) => Partial<TemplateEnv>—Factory producing environment values
loggerPick<Console, 'debug'|'info'|'warn'|'error'>—Optional logger for plugin diagnostics

Template Environment (generateTemplateEnv)

The generateTemplateEnv callback returns an object whose shape matches FusionTemplateEnv. All properties are flattened to FUSION_SPA_* environment variables at build time.

Here's a comprehensive example:

fusionSpaPlugin({
  generateTemplateEnv: () => ({
    // HTML page title
    title: 'My App',

    // Portal configuration: specify which portal to load
    portal: {
      id: 'my-portal', // Portal ID to load and render
      // Can be:
      //   1. A package name (e.g. '@equinor/fusion-framework-dev-portal', default for CLI)
      //   2. An ID from the Fusion Portal Service
      //   3. Any other configured portal ID
      tag: 'latest', // (Optional) Version tag (defaults to 'latest')
      proxy: false, // (Optional) Whether to proxy portal requests through /portal-proxy (defaults to false)
    },

    // Service Discovery configuration
    serviceDiscovery: {
      url: 'https://my-server.com/service-discovery',
      scopes: ['api://my-app/scope'],
    },

    // MSAL (Microsoft Authentication Library) configuration
    msal: {
      tenantId: 'my-tenant-id',
      clientId: 'my-client-id',
      redirectUri: 'https://my-app.com/auth-callback',
      requiresAuth: 'true',
      mock: 'true', // (Optional) Use mock authentication for CI/Playwright
    },

    // Service Worker configuration for API proxying and authentication
    serviceWorker: {
      resources: [
        {
          url: '/app-proxy',
          rewrite: '/@fusion-api/app',
          scopes: ['xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/.default'],
        },
      ],
    },
  })
});

Portal Proxy

The portal proxy feature allows you to route portal entry point requests through a /portal-proxy path prefix. When enabled, the plugin will attempt to load portal code from URLs prefixed with /portal-proxy/, which can be useful when working with proxy servers or development environments that need to intercept and route portal requests.

Behavior:

  • proxy: true → Portal loads from /portal-proxy/{assetPath}/{templateEntry} (allows proxy interception)
  • proxy: false → Portal loads from {assetPath}/{templateEntry} (direct loading)

Configuration Options:

  • proxy: When set to true, portal entry points will be prefixed with /portal-proxy

When to Use Portal Proxy:

  • Development environments where portal assets need to be served through a proxy
  • Deployment scenarios requiring portal routing through specific paths
  • When working with the API Service Plugin for advanced portal loading

Example:

portal: {
  id: 'my-portal',
  tag: 'latest',
  proxy: true, // Portal will be loaded from /portal-proxy/{assetPath}/{templateEntry}
}

See @equinor/fusion-framework-vite-plugin-api-service for advanced API proxying.

Service Discovery

Configures the endpoint the Fusion Framework uses to discover backend service URLs at runtime.

  • url — Endpoint URL of the service discovery configuration
  • scopes — OAuth scopes required to authenticate requests to the service discovery endpoint

MSAL Authentication

Configures Azure AD authentication via the Microsoft Authentication Library (MSAL).

  • tenantId — Azure AD tenant identifier
  • clientId — Application (client) ID registered in Azure AD
  • redirectUri — URL to redirect to after authentication
  • requiresAuth (optional, string) — When 'true', automatically prompts for login on first load
  • mock (optional, string) — When 'true', uses mock authentication instead of Entra ID

Service Worker

The service worker intercepts outgoing fetch requests, matches them against configured ResourceConfiguration patterns, optionally rewrites the URL, and attaches a Bearer token.

How It Works

sequenceDiagram
  participant App as Application
  participant SW as Service Worker
  participant Main as Fusion Framework
  participant API as API Server

  App->>SW: fetch('/app-proxy/assets/some-app/resource.json')
  alt Route matches a registered resource
    SW->>Main: Request auth tokens for scopes
    Main-->>SW: Return tokens
    SW->>SW: Rewrite URL to /@fusion-api/app/assets/some-app/resource.json
    SW->>API: fetch with auth headers
    API-->>SW: Response
    SW-->>App: Return response
  else Route does not match any resource
    SW-->>App: Let request pass through (no interception)
  end

The Service Worker intercepts network requests and can:

  1. Attach OAuth Bearer tokens to matched requests
  2. Rewrite request URLs for proxying
  3. Pass unmatched requests through unmodified

Resource Configuration

Each entry in the resources array is a ResourceConfiguration object:

PropertyTypeDescription
urlstringPath prefix to match against fetch requests
rewritestring?Replacement path prefix for matched requests
scopesstring[]?OAuth scopes to acquire a Bearer token for matched requests

Complete Example

Here's a detailed example of the Service Worker in action:

// Service Worker configuration example
const serviceWorker = {
  resources: [
    {
      url: '/app-proxy',
      rewrite: '/@fusion-api/app',
      scopes: [
        '2bed749c-843b-413d-8b17-e7841869730f/.default',
        '8c24cf81-de7a-435b-ab74-e90b1a7bda0a/.default',
      ],
    },
  ],
};

// Example: Making a request in your application code
fetch('/app-proxy/assets/some-app/resource-path/resource.json');

Request Processing Flow

When the above fetch request is made, the following happens:

  1. The Service Worker intercepts the request matching the /app-proxy pattern
  2. It sends a message to the main thread requesting authentication tokens for the specified scopes
  3. The main thread generates the necessary authentication tokens
  4. The Service Worker rewrites the URL from /app-proxy/assets/some-app/resource-path/resource.json to /@fusion-api/app/assets/some-app/resource-path/resource.json
  5. It adds the authentication headers to the request and executes it against the rewritten URL
  6. The response is returned to the application as if the original URL was called

[!TIP] The url path doesn't need to correspond to an actual endpoint—it's simply a pattern used for matching requests. This allows you to emulate proxy services in production environments without changing your application code.

[!TIP] For enhanced development capabilities, consider using the @equinor/fusion-framework-vite-plugin-api-service plugin. This plugin creates a dynamic proxy service that can handle requests to the /@fusion-api/app path by intercepting them in the dev-server and routing them based on service discovery configuration.

Telemetry

The plugin configures console telemetry via @equinor/fusion-framework-module-telemetry. Severity levels map to integers:

LevelValueDescription
Debug0Detailed debugging information
Information1General operational information
Warning2Potential issues that are not critical
Error3Errors that do not prevent continued operation
Critical4Severe errors that may halt functionality

Controlling Console Output

Set FUSION_SPA_TELEMETRY_CONSOLE_LEVEL to the minimum level to display. Default is 1 (Information).

FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=2  # Warning and above

For advanced telemetry (e.g. Application Insights), provide a custom bootstrap file.

When used by @equinor/fusion-framework-dev-server, the default bootstrap also supports OTLP logs through the telemetry module's public OtlpAdapter, plus standard OpenTelemetry browser request tracing and W3C propagation. Set FUSION_DEV_SERVER_OTLP_ENDPOINT in the app's dev-server process; no app code change is required. The dev server owns the environment bridge and same-origin collection route. The bootstrap checks only whether an endpoint is configured; the serve-only dev-server bridge controls activation. Explicitly configured app adapters and existing global tracer providers take precedence. See dev-server telemetry configuration.

Configuring through .env Files

The plugin reads environment variables from .env files (via Vite's loadEnv) and merges them on top of values from generateTemplateEnv. This lets you keep secrets and per-environment values out of source code.

Naming Convention

  1. Prefix all variables with FUSION_SPA_ (or your custom templateEnvPrefix).
  2. Convert nested object paths to UPPER_SNAKE_CASE (e.g. serviceDiscovery.url → FUSION_SPA_SERVICE_DISCOVERY_URL).
  3. Serialize arrays and objects as JSON strings.

Mapping Example

// JavaScript configuration
{
  serviceWorker: {
    resources: [...],
  },
}

// Becomes this environment variable
FUSION_SPA_SERVICE_WORKER_RESOURCES=[...]

// And can be accessed in your code as
import.meta.env.FUSION_SPA_SERVICE_WORKER_RESOURCES

Complete .env Example

# Page title
FUSION_SPA_TITLE=My App

# Portal manifest
FUSION_SPA_PORTAL_ID=my-portal
FUSION_SPA_PORTAL_TAG=latest
FUSION_SPA_PORTAL_PROXY=false

# Service Discovery
FUSION_SPA_SERVICE_DISCOVERY_URL=https://my-server.com/service-discovery
FUSION_SPA_SERVICE_DISCOVERY_SCOPES=[api://my-app/scope]

# MSAL
FUSION_SPA_MSAL_TENANT_ID=my-tenant-id
FUSION_SPA_MSAL_CLIENT_ID=my-client-id
FUSION_SPA_MSAL_REDIRECT_URI=https://my-app.com/auth-callback
FUSION_SPA_MSAL_REQUIRES_AUTH=true
# Set to skip Entra ID and sign in a mock user instead — use together with a mock server (see below)
FUSION_SPA_MSAL_MOCK=true
# Optional: standalone mock-server origin used for session-scoped token acquisition
FUSION_SPA_MSAL_MOCK_SERVER_URL=http://localhost:4010

# Telemetry
FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=2

# Service Worker (JSON string)
FUSION_SPA_SERVICE_WORKER_RESOURCES=[{"url":"/app-proxy","rewrite":"/@fusion-api/app","scopes":["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/.default"]}]

[!TIP] Use generateTemplateEnv during development for type safety and easier debugging. Use .env files for CI/CD and deployment overrides.

[!IMPORTANT] The .env file must be in the project root (or the directory specified by Vite's envDir). Values from .env files override matching values from generateTemplateEnv.

Running Against a Mock Client (CI / Playwright)

Run CI and Playwright suites against the standalone mock server, so both authentication and service discovery stay local:

ffc mock-server ./mocks --port 4010
ffc app dev --mock http://localhost:4010

Setting FUSION_SPA_MSAL_MOCK=true swaps the real MSAL client for @equinor/fusion-framework-module-msal/mock, which signs in a default mock user with no Entra ID redirects or popups. Mock tokens are unsigned, so real Fusion services reject them. ffc app dev and ffc app serve therefore also send service discovery to the mock server whenever mock auth is on — FUSION_SPA_MSAL_MOCK_SERVER_URL, or http://localhost:4010 when only FUSION_SPA_MSAL_MOCK is set.

FUSION_SPA_MSAL_MOCK=true

[!IMPORTANT] A direct Vite setup must point FUSION_SPA_SERVICE_DISCOVERY_URL (or the dev server's service discovery URL) at the mock server too. Otherwise every page load sends a mock token to real service discovery and fails with 401.

By default the mock signs in a generic Test User. To select and switch users at runtime, start the standalone mock server with the browser origin explicitly allowed, then point the app at it:

ffc mock-server ./mocks --port 4010 --allow-origin http://localhost:3000
ffc app dev --mock http://localhost:4010

The --mock option enables mock authentication and supplies the mock-server URL to the SPA. A direct Vite setup can provide the same values through FUSION_SPA_MSAL_MOCK=true and FUSION_SPA_MSAL_MOCK_SERVER_URL=http://localhost:4010.

Playwright and other cookie-aware HTTP clients can select users through createMockAuth from @equinor/fusion-openapi-mock-server. The standalone mock server stores the user per browser context and issues an unsigned OBO-style token for each scope set requested by Fusion MSAL. This supports switching and parallel personas without restarting the app or dev server; see the Playwright guide.

Mocking authentication does not mock the rest of the API surface — service discovery and any backend calls the portal makes still hit real URLs unless you also override them. Use the dev server's api.routes/api.processServices options (see the @equinor/fusion-framework-dev-server docs) to intercept those requests with fixture responses.

Advanced Customization

Providing a Custom Template

Override the built-in HTML template by passing a template string to the plugin. Placeholders use the %VAR% syntax from Vite's HTML constant replacement.

[!WARNING] Custom templates bypass the default structure. You are responsible for loading the bootstrap script and ensuring proper document structure.

Example Custom Template

// Define your custom HTML template
const template = `
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>%MY_CUSTOM_TITLE%</title>
    <script type="module" src="./src/my-custom-bootloader"></script>
  </head>
  <body>
    <h1>%MY_CUSTOM_PROPERTY%</h1>
    <div id="app"></div>
  </body>
</html>
`;

// Configure Vite with your custom template
import { defineConfig } from 'vite';
import { createViteSPAPlugin } from '@equinor/fusion-framework-vite-plugin-spa';

// Custom prefix for environment variables
const templateEnvPrefix = 'MY_CUSTOM_';

export default defineConfig({
  // Define environment variables to inject into the template
  define: {
    [`import.meta.env.${templateEnvPrefix}PROPERTY`]: '"my-custom-value"',
    [`import.meta.env.${templateEnvPrefix}TITLE`]: '"My Application"',
  },
  // Use the custom template with the plugin
  plugins: [createViteSPAPlugin({ template, templateEnvPrefix })],
});

[!TIP] For more details on how HTML template variable replacement works in Vite, see the Vite documentation.

Providing Custom Bootstrap

For even more control, you can specify a custom bootstrap file that handles the initialization of your application:

fusionSpaPlugin({
  generateTemplateEnv: () => {
    return {
      // Points to your custom bootstrap file
      bootstrap: 'src/my-custom-bootloader.ts',
    }
  }
});

Implementing Your Custom Bootloader

When implementing a custom bootloader, you'll need to handle all the initialization logic that would normally be managed by the default bootloader, including service worker registration:

// custom-bootloader.ts
import { registerServiceWorker } from '@equinor/fusion-framework-vite-plugin-spa/html';
import initializeFramework from './my-custom-framework.js';

// Initialize your framework and register the service worker
const app = await initializeFramework();
registerServiceWorker(app);

// Additional custom initialization code
document.addEventListener('DOMContentLoaded', () => {
  console.log('Application fully loaded');
});

[!WARNING] When using a custom bootloader, the default ServiceWorker registration is bypassed. You must explicitly call registerServiceWorker() in your custom bootloader to maintain this functionality, as shown in the example above.

Examples

Basic SPA with React

// vite.config.ts
import { defineConfig } from 'vite';
import { plugin as fusionSpaPlugin } from '@equinor/fusion-framework-vite-plugin-spa';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [
    react(),
    fusionSpaPlugin({
      generateTemplateEnv: () => ({
        title: 'My React App',
        portal: { id: 'my-portal' },
        serviceDiscovery: {
          url: 'https://dev-server.com/service-discovery',
          scopes: ['api://my-app/user.read'],
        },
        msal: {
          tenantId: process.env.TENANT_ID,
          clientId: process.env.CLIENT_ID,
          redirectUri: 'http://localhost:3000/auth-callback',
          requiresAuth: 'true',
        },
        telemetry: {
          consoleLevel: 2, // Show Warning, Error, and Critical events
        },
      }),
    }),
  ],
});

Using with API Service Plugin

// vite.config.ts
import { defineConfig } from 'vite';
import { plugin as fusionSpaPlugin } from '@equinor/fusion-framework-vite-plugin-spa';
import { plugin as apiServicePlugin } from '@equinor/fusion-framework-vite-plugin-api-service';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [
    react(),
    fusionSpaPlugin({
      generateTemplateEnv: () => ({
        title: 'API Service Example',
        // Portal to load
        portal: {
          id: 'my-portal',
          tag: 'latest',
        },
        serviceDiscovery: {
          url: 'https://dev-server.com/service-discovery',
          scopes: ['api://my-app/user.read'],
        },
        serviceWorker: {
          resources: [
            {
              url: '/api-proxy',
              rewrite: '/@fusion-api/service',
              scopes: ['api://backend-service/.default'],
            },
          ],
        },
      }),
    }),
    // API Service plugin enables portal loading from service discovery
    apiServicePlugin(),
  ],
});

See API Service Plugin docs for more details.

Troubleshooting

Common Issues

SymptomLikely CauseFix
Authentication failuresWrong tenantId or clientIdVerify Azure AD app registration and scope configuration
Service worker not interceptingWorker not registered or not controllingCheck browser console for registration errors; ensure registerServiceWorker is called
.env values ignoredWrong prefix or missing restartConfirm FUSION_SPA_* naming; restart the dev server

Known Issues

IssueImpactDescription
#3266Missing bearer token on proxy assetsWhen loading remote applications that use assets or code-splitting, the service worker may fail to attach the required Bearer token to requests for these resources. This occurs because the service worker rewrites import.url, which can interfere with proper token injection for asset requests. As a result, protected assets may not load correctly in some scenarios.

Best Practices

  • Keep secrets out of source code — use .env files or CI/CD variables.
  • Use the API Service Plugin for advanced proxy routing during development.
  • When using custom templates or bootstrap files, always verify service worker registration and authentication flows.

Contributing

Contributions, bug reports, and feature requests are welcome! See CONTRIBUTING.md for guidelines.

版本与发布记录

@equinor/fusion-framework-vite-plugin-spa 共发布 87 个版本,首次发布于 2025/05/27;过去 12 个月发布了 61 个版本。

版本发布日期距今
5.2.5latest2026/11/121 天前
5.2.5-next.0next2026/11/112 天前
5.2.42026/11/112 天前
5.2.4-next.22026/10/2915 天前
5.2.4-next.12026/10/2816 天前
5.2.4-next.02026/10/2816 天前

其他发布通道:cli-search-index → 3.0.1-cli-search-index.0,msal-v5 → 3.1.1-msal-v5.1,trusted-publishing-20261015 → 5.2.3-trusted-publishing-20261015-9dfe7602cd2a49a8a9df00d62c26e7304a82a85a,next → 5.2.5-next.0。

关于 @equinor/fusion-framework-vite-plugin-spa 的常见问题

@equinor/fusion-framework-vite-plugin-spa 是什么?

Vite plugin for SPA development

如何安装 @equinor/fusion-framework-vite-plugin-spa?

在项目目录运行 npm install @equinor/fusion-framework-vite-plugin-spa,或使用 pnpm add / yarn add / bun add。

@equinor/fusion-framework-vite-plugin-spa 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@equinor/fusion-framework-vite-plugin-spa 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@equinor/fusion-framework-vite-plugin-spa 可以商用吗?

@equinor/fusion-framework-vite-plugin-spa 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@equinor/fusion-framework-vite-plugin-spa 的下载量有多少?

根据 npm 官方下载统计,@equinor/fusion-framework-vite-plugin-spa 在 2026/10/14 – 2026/11/12 这 30 天内被下载 9,228 次,日均约 308 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@equinor/fusion-framework-vite-plugin-spa 还在维护吗?

最新版本 5.2.5 发布于 2026/11/12(1 天前);至今共发布 87 个版本,其中过去 12 个月发布了 61 个;首次发布于 2025/05/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。