Upgrade Guide
Introduction
Version 2.9 introduces a pure ESM architecture with UI components as named exports. The SDK is distributed via npm, making upgrades straightforward.
Upgrade via npm
To upgrade to the latest version of the SDK, run:
npm update @invox-medical-npm/invox-dictation
Check your current version
To verify which version is installed:
npm list @invox-medical-npm/invox-dictation
Install a specific version
If you need to install a specific version (e.g., to match your server):
npm install @invox-medical-npm/invox-dictation@2.9.26
Breaking changes from v2.8
1. ESM module system
The previous invox.min.js (IIFE) build has been replaced with an ESM bundle:
- <script src="./node_modules/@invox-medical-npm/invox-dictation/dist/libs/invox.min.js"></script>
+ <script type="module">
+ import INVOX from "@invox-medical-npm/invox-dictation";
+ </script>
2. Components are named exports
UI components are now named exports from the package, not global INVOXMDComponent_* variables:
- const bar = INVOXMDComponent_Bar.create("invox-bar");
+ import { BarComponent } from "@invox-medical-npm/invox-dictation";
+ const bar = BarComponent.create("invox-bar");
| Old global | New named export |
|---|---|
INVOXMDComponent_Bar | BarComponent |
INVOXMDComponent_Dictionary | DictionaryDialog |
INVOXMDComponent_Templates | TemplatesDialog |
INVOXMDComponent_Transformations | TransformationsDialog |
3. CSS is auto-injected
Separate CSS file imports are no longer needed; styles are injected at runtime:
- <link rel="stylesheet" href="invox-bar-component.css">
+ // No CSS import needed; styles are auto-injected.
4. No opus/ folder copying required
The Opus audio library is bundled within the main ESM module — no manual cp -r step needed.
Migration steps
- Update the SDK:
npm install @invox-medical-npm/invox-dictation - Replace script tags with
type="module"imports. - Replace component globals with named imports from the package.
- Remove CSS
linktags for component stylesheets. - Remove
opus/folder copying from your build script. - Test your application thoroughly after migration.
Before upgrading patch versions, check the Changelog for any breaking changes.