feat: Update to use pnpm (#6031)

* Initial pnpm change

* Install/update in pnpm sort of works

* Attempt to fix install

* fix pnpm

* Refactor build process to use RSPack instead of Webpack across multiple extensions and modes. Update package.json scripts for development and production builds, and adjust webpack configuration files to accommodate new plugin imports and settings.

* Update RSPack dependencies to version 2.0.0 across the project, enhancing compatibility and performance. Refactor webpack configuration in multiple extensions and modes to utilize the new library structure for UMD output. Adjust package.json scripts and settings for improved build processes.

* Implement migration guide for OHIF 3.13, detailing the transition from Webpack to Rspack v2, the shift to pnpm workspaces, and the increase in minimum Node.js version to 24. Include new build commands, plugin replacements, and updates to package configurations across the monorepo.

* Fix some dev:fast bugs

* Move netlify to top level and remove webpack builds

* Update version script to deal with lerna missing

* chore(tests): Update multiple screenshot test images for various specs

* feat(screenshot-reviewer): Add screenshot review tool and update package.json scripts

* fix(DICOMSRDisplayTool): Improve actor presence check in viewport

* chore(tests): Update multiple screenshot assets for various specs

* chore(tests): Integrate waitForPaintToSettle and waitForViewportsRendered in multiple specs for improved rendering stability

* chore(tests): Update screenshot assets for SEGHydration and SEGNoHydration specs

* test: update progressive loading screenshots

* jest 30 test fixes for compatibility with pnpm cs3d

* Use correct setDisplaySets instead of setDataId

* fix: Naming change for LegacyVolumeViewport3D

* Update to allow tolerance for contour tests

* update

* fix

* refactor: Replace instanceof checks with utility functions for viewport type validation

* fix: Update createSegmentationForViewport to handle undefined displaySetInstanceUID gracefully

* bun lock

* chore(pnpm): align workspace setup to cornerstone3D and address PR review

- .npmrc / pnpm-workspace.yaml: mirror cs3d (node-linker hoisted,
  strict-peer-dependencies=false, link/prefer workspace packages,
  minimumReleaseAge, frozenLockfile); sync axios 1.17.0 + tmp override
- root: packageManager pnpm@11.4.0, engines pnpm >=11, wire preinstall.js
- restore preinstall.js (token/private-repo + CLAUDE->AGENTS symlink)
- playwright.yml: keep base CS3D-integration workflow, switch only the
  package manager (bun/yarn -> pnpm) and node 20 -> 24
- webpack.base.js: revert prod devtool to source-map (drop hidden-source-map)
- remove @percy/cypress; .netlify + cli templates engines pnpm >=11
- Dockerfile pin pnpm@11; document tests/globalSetup.ts warmup
- drop dicom-sr -> measurement-tracking edge (breaks pnpm cyclic dep)

* chore(pnpm): regenerate lockfile and restore cs3d:* dev scripts

- Regenerate pnpm-lock.yaml against the resolved workspace (cycle removed,
  cs3d 4.22.10, workspace:* internal deps).
- Restore cs3d:checkout/check/build/watch/install/link/unlink helper scripts
  (dropped when taking the PR's root scripts), converted yarn -> pnpm since
  the local cornerstone3D checkout is now pnpm too.

* Merge base branch issues

* Link ohif app

* ci: pin pnpm to 11.4.0 in action-setup (was version: latest)

version: latest floats across runs and breaks reproducibility. Pin to the repo's packageManager version (pnpm@11.4.0) in both playwright and build-docs workflows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: Accidental commit of .npmrc config

* Fix build issues

* build fix

* Dependency fixes

* fix: Dependency bug in app on extensions/modes

* Fix output configuration

* Replace percy screenshots with native cypress

* Remove percy screenshot entirely

* fix: Build issues

* force click to prevent canvas cover issues

* Enable swiftshader

* Update launch of electron

* fix: Broken size calculation

* Empty change to force a re-build

* fix(cypress): generate ui-next tailwind classes; drop unsupported electron arg

Tailwind only scanned @ohif/ui-next via ../../node_modules/@ohif/ui-next, which no longer resolves under the pnpm layout, so ui-next-unique classes (e.g. toolbar split-button sizing) were never generated. Those buttons' hit-boxes collapsed, producing Cypress 'covered by element' failures on toolbar interactions. Scan ui-next by direct filesystem path like ui/extensions/modes.

Also stop pushing --enable-unsafe-swiftshader into Electron's launchOptions.args (Electron ignores it and warns); it is supplied via ELECTRON_EXTRA_LAUNCH_ARGS in CI. The arg is still pushed for non-electron chromium (local chrome).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(e2e): disable dev-server overlay during coverage runs

The rspack dev-server client overlay injects an iframe (id=rspack-dev-server-client-overlay) that intercepts pointer events, causing Playwright/Cypress clicks on toolbar buttons to time out (e.g. MicroscopyPanel). Disable the overlay when COVERAGE=true (e2e/Playwright webServer) while keeping it for normal local dev.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(microscopy): provide dicom-microscopy-viewer runtime assets

The microscopy viewer is loaded at runtime via peerImport('dicom-microscopy-viewer'), which fetches the copied asset served at /dicom-microscopy-viewer/. Two issues prevented those assets from reaching dist, so the viewer never initialized and drawing produced no measurement row:

1) dicom-microscopy-viewer was declared in no workspace package.json (only under libs/@cornerstonejs), so it was not installed at root node_modules and the pluginConfig copy source did not exist. Declare it (0.48.6, matching libs) in the microscopy extension.

2) createCopyPluginToDist appended the public/dist folder name to entries that specify an explicit directory, breaking the dicom-microscopy-viewer public entry (looked for .../dynamic-import/public). Use an explicit directory as-is; only append the folder name for package-derived entries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Update to pnpm 11.5.2 and cs3d 5.0.2

* Lock file

* fix: Update to newer versions of actions to try to fix hang

* Remove unnecessary version

* fix: Tests that are flaky

* PR comments

* Incorrect run name

* docs: Explain pluginConfig tooling

* Updated notes on pluginConfig and PR comments

* fix: resolve plugins in rsbuild build and fix directory-based asset copy

rsbuild.config.ts: merge getPluginResolveAliases() and an @ohif/app$ alias into resolve.alias, and add resolve.modules (root, platform/app, platform/ui node_modules) so extensions resolve their shared @ohif/* imports. Brings the rsbuild (dev:fast) path to parity with webpack.pwa.js / webpack.base.js.

writePluginImportsFile.js: treat a 'directory' on an extension/mode entry as the package root and copy its public/ and dist/ subdirs instead of the whole directory; public-section entries keep copying their directory verbatim via a new literalDirectory flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: share resolve alias/modules between webpack and rsbuild configs

Extract the resolve.alias (@ohif/app, @, @components, ...) and the node_modules search paths into .webpack/resolveConfig.js, the single source of truth consumed by both webpack.base.js (and every per-package webpack.prod/.dev.js that merges it) and rsbuild.config.ts. getModules(srcDir) appends the building package's own source root, preserving the previous per-package behavior. Ends the drift where the rsbuild path kept missing aliases/module paths that webpack.base.js already had.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Add a timeout on git fetch and avoid all the unnecessary mirrros

* PR comments and tests

* Remove cache to prevent corrupting the cache key/setup.

* Fix stale/corrupted pnpm installer

---------

Co-authored-by: Alireza <ar.sedghi@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bill Wallace 2026-06-12 16:04:56 -04:00 committed by GitHub
parent 571c2b4ff0
commit f1cc2ee13a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
126 changed files with 31623 additions and 55381 deletions

View File

@ -1,26 +1,30 @@
version: 2.1
# ci: re-trigger pipeline
orbs:
codecov: codecov/codecov@1.0.5
cypress: cypress-io/cypress@3.4.2
defaults: &defaults
docker:
- image: cimg/node:20.19.0
- image: cimg/node:24.0.0
environment:
TERM: xterm
QUICK_BUILD: true
working_directory: ~/repo
commands:
install_bun:
install_pnpm:
steps:
- run:
name: Install Bun
name: Install pnpm
command: |
curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.23"
echo 'export BUN_INSTALL="$HOME/.bun"' >> $BASH_ENV
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> $BASH_ENV
# The cimg/node global modules dir (/usr/local/lib/node_modules) is
# root-owned, so a plain `npm install -g` fails with EACCES. Install
# with sudo so the global pnpm binary lands in the shared prefix.
sudo npm install -g pnpm@11.5.2
echo 'export PATH="$(pnpm store path)/../.bin:$PATH"' >> $BASH_ENV
source $BASH_ENV
jobs:
@ -28,16 +32,16 @@ jobs:
<<: *defaults
resource_class: large
steps:
- install_bun
- install_pnpm
- run: node --version
- checkout
- run:
name: Install Dependencies
command: bun install --no-save
command: pnpm install --no-frozen-lockfile
# RUN TESTS
- run:
name: 'JavaScript Test Suite'
command: bun run test:unit:ci
command: pnpm run test:unit:ci
# platform/app
- run:
name: 'VIEWER: Combine report output'
@ -71,17 +75,17 @@ jobs:
steps:
# Checkout code and ALL Git Tags
- checkout
- install_bun
- install_pnpm
- run:
name: Install Dependencies
command: bun install --no-save
command: pnpm install --no-frozen-lockfile
# Build & Test
- run:
name: 'Perform the versioning before build'
command: bun ./version.mjs
command: node ./version.mjs
- run:
name: 'Build the OHIF Viewer'
command: bun run build
command: pnpm run build
no_output_timeout: 45m
- run:
name: 'Upload SourceMaps, Send Deploy Notification'
@ -107,14 +111,55 @@ jobs:
<<: *defaults
resource_class: large
steps:
- install_bun
- install_pnpm
# Checkout code and ALL Git Tags
- checkout
- attach_workspace:
at: ~/repo
# SECURITY AUDIT - only when pnpm-lock.yaml has changed
- run:
name: 'Security Audit - High Risk Vulnerabilities'
command: |
git fetch origin master 2>/dev/null || true
BASE_REF=$(git merge-base HEAD origin/master 2>/dev/null)
if [[ -z "$BASE_REF" ]]; then
echo "Could not determine base ref (e.g. shallow clone or no origin/master), skipping security audit."
exit 0
fi
CHANGED_FILES=$(git diff --name-only origin/master...HEAD 2>/dev/null || echo "")
if ! echo "$CHANGED_FILES" | grep -qx 'pnpm-lock.yaml'; then
echo "pnpm-lock.yaml unchanged - skipping security audit."
exit 0
fi
echo "pnpm-lock.yaml changed - running pnpm audit for security vulnerabilities..."
echo "Checking for HIGH-RISK vulnerabilities..."
if pnpm audit --audit-level high; then
echo "No high-risk vulnerabilities found"
echo "Security audit passed!"
else
echo ""
echo "HIGH-RISK VULNERABILITIES DETECTED!"
echo "======================================"
echo ""
echo "To fix these issues:"
echo " 1. Run: pnpm audit"
echo " 2. Review the vulnerability details"
echo " 3. Update affected packages to secure versions"
echo " 4. Test your changes"
echo " 5. Re-run: pnpm audit --audit-level high"
echo ""
echo "Full audit report:"
pnpm audit || true
echo ""
echo "This build cannot proceed until high-risk vulnerabilities are resolved."
exit 1
fi
- run:
name: Install Dependencies
command: bun install --frozen-lockfile
command: pnpm install
- run:
name: Avoid hosts unknown for github
command: |
@ -129,24 +174,24 @@ jobs:
- run:
name: build half of the packages (to avoid out of memory in circleci)
command: |
bun run build:package-all
pnpm run build:package-all
- run:
name: build the other half of the packages
command: |
bun run build:package-all-1
pnpm run build:package-all-1
NPM_PUBLISH:
<<: *defaults
resource_class: large
steps:
- install_bun
- install_pnpm
# Checkout code and ALL Git Tags
- checkout
- attach_workspace:
at: ~/repo
- run:
name: Install Dependencies
command: bun install --no-save
command: pnpm install --no-frozen-lockfile
- run:
name: Avoid hosts unknown for github
command: |
@ -161,11 +206,11 @@ jobs:
- run:
name: build half of the packages (to avoid out of memory in circleci)
command: |
bun run build:package-all
pnpm run build:package-all
- run:
name: build the other half of the packages
command: |
bun run build:package-all-1
pnpm run build:package-all-1
- run:
name: increase min time out
command: |
@ -177,14 +222,14 @@ jobs:
- run:
name: publish package versions
command: |
bun ./publish-version.mjs
node ./publish-version.mjs
- run:
name: Again set the NPM registry (was deleted in the version script)
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: publish package dist
command: |
bun ./publish-package.mjs
node ./publish-package.mjs
- persist_to_workspace:
root: ~/repo
paths:
@ -330,11 +375,20 @@ jobs:
resource_class: large
parallelism: 8
steps:
- install_bun
- install_pnpm
- run:
name: Install System Dependencies
command: |
sudo apt-get update
# CircleCI's base image registers third-party apt sources (git-lfs via
# packagecloud, git-core PPA via launchpad) that periodically hang
# `apt-get update`. The Cypress libs below all come from the Ubuntu
# archive, so drop those sources and bound the update with timeouts +
# retries so a slow mirror can't stall the job indefinitely.
sudo rm -f /etc/apt/sources.list.d/*git* || true
sudo apt-get update \
-o Acquire::Retries=3 \
-o Acquire::http::Timeout=20 \
-o Acquire::https::Timeout=20
sudo apt-get install -y xvfb libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6
- run:
name: Start Xvfb
@ -344,74 +398,15 @@ jobs:
name: Export Display Variable
command: export DISPLAY=:99
- cypress/install:
install-command: yarn install --frozen-lockfile --no-save
install-command: pnpm install
- cypress/run-tests:
# CI runs headless under Xvfb with no GPU, so Electron uses software
# WebGL. Newer Chromium deprecated that implicit fallback (canvas
# rendering degrades and races with element clicks). ELECTRON_EXTRA_LAUNCH_ARGS
# is the reliable way to pass the opt-in flag to Cypress's Electron browser.
cypress-command: |
npx wait-on@latest http://localhost:3000 && cd platform/app && npx cypress run --record --parallel
start-command: yarn run test:data && yarn run test:e2e:serve
SECURITY_AUDIT:
<<: *defaults
resource_class: large
steps:
- install_bun
- checkout
- run:
name: 'Security Audit - High Risk Vulnerabilities'
command: |
git fetch origin master 2>/dev/null || true
BASE_REF=$(git merge-base HEAD origin/master 2>/dev/null)
if [[ -z "$BASE_REF" ]]; then
echo "Could not determine base ref (e.g. shallow clone or no origin/master), skipping security audit."
exit 0
fi
CHANGED_FILES=$(git diff --name-only origin/master...HEAD 2>/dev/null || echo "")
if ! echo "$CHANGED_FILES" | grep -qx 'bun.lock'; then
echo "⏭️ bun.lock unchanged - skipping security audit."
exit 0
fi
echo "🔍 bun.lock changed - running bun audit for security vulnerabilities..."
echo "Checking for HIGH-RISK vulnerabilities..."
# Define ignored vulnerabilities with comments
IGNORED_VULNS=(
"GHSA-3ppc-4f35-3m26" # CVE-2026-26996 - minimatch via itk-wasm and glob is safe because it does NOT use the CLI
# CVE-2026-26996 - minimatch via other packages are strictly for building and CI/CD purposes; no user supplied expressions are passed to minimatch
"GHSA-7r86-cg39-jmmj" # CVE-2026-27903 - minimatch same as above
"GHSA-23c5-xmqv-rm74" # CVE-2026-27904 - minimatch same as above
"GHSA-c2c7-rcm5-vvqj" # CVE-2026-33671 - picomatch is generally used for development and CI/CD purposes
)
# Build ignore flags
IGNORE_FLAGS=""
for vuln in "${IGNORED_VULNS[@]}"; do
IGNORE_FLAGS="$IGNORE_FLAGS --ignore=$vuln"
done
if bun audit $IGNORE_FLAGS --audit-level high; then
echo "✅ No high-risk vulnerabilities found"
echo "🎉 Security audit passed!"
exit 0
else
echo ""
echo "❌ HIGH-RISK VULNERABILITIES DETECTED!"
echo "======================================"
echo ""
echo "🔧 To fix these issues:"
echo " 1. Run: bun audit"
echo " 2. Review the vulnerability details"
echo " 3. Update affected packages to secure versions"
echo " 4. Test your changes"
echo " 5. Re-run: bun audit --audit-level high"
echo ""
echo "📋 Full audit report:"
bun audit $IGNORE_FLAGS --audit-level low || true
echo ""
echo "❌ This build cannot proceed until high-risk vulnerabilities are resolved."
exit 1
fi
npx wait-on@latest http://localhost:3000 && cd platform/app && ELECTRON_EXTRA_LAUNCH_ARGS="--enable-unsafe-swiftshader" npx cypress run --record --parallel
start-command: pnpm run test:data && pnpm run test:e2e:serve
DOCKER_MULTIARCH_MANIFEST:
<<: *defaults
@ -502,10 +497,6 @@ workflows:
- CYPRESS:
name: 'Cypress Tests'
context: cypress
- SECURITY_AUDIT:
filters:
branches:
ignore: master
# viewer-dev.ohif.org
DEPLOY_MASTER:

View File

@ -1,18 +1,8 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: 'bun'
# Disable all pull requests for bun version updates.
open-pull-requests-limit: 0
directory: '/'
schedule:
interval: 'daily'
labels: ['dependencies']
commit-message:
prefix: 'chore'
include: 'scope'
- package-ecosystem: 'npm'
# Disable all pull requests for npm version updates.
# Disable all pull requests for npm/pnpm version updates.
open-pull-requests-limit: 0
directory: '/'
schedule:

View File

@ -21,16 +21,22 @@ jobs:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
bun-version: 1.2.23
- uses: actions/setup-node@v4
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20 # Or your desired Node version
node-version: 24
cache: pnpm
- name: Install root dependencies
run: bun install --frozen-lockfile
- name: Configure git for private repos
run: git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf ssh://git@github.com/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Removed Playwright tests and coverage generation steps
@ -44,47 +50,44 @@ jobs:
# Note: This relies on the merge commit being directly pushed to main
PR_DATA=$(gh pr list --state merged --search "$MERGE_COMMIT_SHA" --json number,headRefOid --jq '.[0]')
if [ -z "$PR_DATA" ]; then
echo "Could not find merged PR for commit $MERGE_COMMIT_SHA."
# Decide how to handle - fail, or maybe generate coverage now?
# For now, let's fail.
exit 1
echo "::warning::Could not find merged PR for commit $MERGE_COMMIT_SHA. Skipping coverage embedding."
echo "coverage_found=false" >> $GITHUB_OUTPUT
exit 0
fi
PR_HEAD_SHA=$(echo "$PR_DATA" | jq -r '.headRefOid')
PR_NUMBER=$(echo "$PR_DATA" | jq -r '.number')
echo "Found PR Number: $PR_NUMBER"
echo "Found PR Head SHA: $PR_HEAD_SHA"
# Find the latest workflow run ID for the playwright workflow on the PR head commit
# Uses the workflow file name 'playwright.yml'
# Remove the --status success flag to find any run
RUN_ID=$(gh run list --workflow playwright.yml --commit "$PR_HEAD_SHA" --event pull_request --json databaseId --jq '.[0].databaseId')
# Find the latest *successful* playwright.yml run for the PR head commit so we
# never embed coverage from a failed/incomplete run.
RUN_ID=$(gh run list --workflow playwright.yml --commit "$PR_HEAD_SHA" --event pull_request --status success --json databaseId --jq '.[0].databaseId')
if [ -z "$RUN_ID" ]; then
echo "Could not find any 'playwright.yml' run for PR $PR_NUMBER (Head SHA: $PR_HEAD_SHA)."
# Decide how to handle - maybe try finding the artifact from the merge commit run if that exists?
# For now, let's fail.
exit 1
echo "::warning::Could not find a successful 'playwright.yml' run for PR $PR_NUMBER (Head SHA: $PR_HEAD_SHA). Skipping coverage embedding."
echo "coverage_found=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "Found Run ID: $RUN_ID"
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
echo "coverage_found=true" >> $GITHUB_OUTPUT
- name: Download coverage artifact from PR run
if: steps.find_pr_run.outputs.coverage_found == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p ./coverage-artifact
gh run download ${{ steps.find_pr_run.outputs.run_id }} -n coverage-report-pr --dir ./coverage-artifact
# Check if download was successful (e.g., check if files exist)
if [ ! -f ./coverage-artifact/base.css ]; then
echo "Failed to download or find expected files in artifact 'coverage-report-pr' from run ${{ steps.find_pr_run.outputs.run_id }}."
# Verify the artifact contains an HTML coverage report rather than checking a single asset
if [ -z "$(ls -A ./coverage-artifact)" ] || ! ls ./coverage-artifact/*.html >/dev/null 2>&1; then
echo "Failed to download or find an HTML coverage report in artifact 'coverage-report-pr' from run ${{ steps.find_pr_run.outputs.run_id }}."
exit 1
fi
echo "Artifact downloaded successfully."
- name: Install docs dependencies
run: cd platform/docs && bun install
- name: Copy coverage to docs static directory
if: steps.find_pr_run.outputs.coverage_found == 'true'
run: |
# Copy files from the downloaded artifact directory
mkdir -p platform/docs/static/coverage
@ -99,7 +102,7 @@ jobs:
cp ./coverage-artifact/sorter.js platform/docs/static/
- name: Build docs
run: cd platform/docs && bun run build
run: pnpm --filter ohif-docs run build
- name: Deploy to Netlify
run: |

View File

@ -55,7 +55,9 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
@ -65,7 +67,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3.36.2
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
@ -93,6 +95,6 @@ jobs:
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3.36.2
with:
category: "/language:${{matrix.language}}"

View File

@ -29,18 +29,24 @@ jobs:
matrix:
node-version: [24]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
bun-version: 1.2.23
- uses: pnpm/action-setup@v4
with:
version: 11.4.0
- uses: actions/setup-node@v4
persist-credentials: false
# Self-hosted runner hygiene: wipe any stale/corrupted pnpm self-install
# before action-setup reinstalls it. A prior `cache: pnpm` restore left a
# pnpm install missing dist/worker.js, breaking `pnpm install`. Plain shell
# so it runs even when pnpm itself is broken. Cheap: action-setup reinstalls.
- name: Reset stale pnpm self-install
shell: bash
run: rm -rf "$HOME/setup-pnpm"
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn@1.22.22
# No `cache: pnpm`: this is a self-hosted runner with a persistent
# pnpm store on local disk. The Actions cache doesn't preserve the
# pnpm self-install's links faithfully, dropping pnpm/dist/worker.js
# and breaking `pnpm install` with MODULE_NOT_FOUND.
# ── CS3D integration: detect label and ref type ──────────────────────
- name: Check for CS3D integration label
@ -94,7 +100,7 @@ jobs:
# ── Common: install OHIF dependencies ───────────────────────────────
- name: Install dependencies
run: bun install --frozen-lockfile
run: pnpm install --frozen-lockfile
# ── CS3D branch path: link packages after OHIF install ──────────────
- name: Link CS3D packages
@ -107,7 +113,7 @@ jobs:
if: steps.cs3d-check.outputs.enabled == 'true' && steps.cs3d-ref.outputs.type == 'version'
run: |
node .scripts/cs3d-set-version.mjs "${CS3D_VERSION}"
bun install --config=./bunfig.update-lockfile.toml
pnpm install --no-frozen-lockfile
env:
CS3D_VERSION: ${{ steps.cs3d-ref.outputs.version }}
@ -117,7 +123,7 @@ jobs:
- name: Run Playwright tests
run: |
export NODE_OPTIONS="--max_old_space_size=10192"
bun run test:e2e:coverage
pnpm run test:e2e:coverage
# ── Common: collect test results and coverage ───────────────────────
- name: Create directory of test results
@ -128,17 +134,17 @@ jobs:
cp -r ./tests/playwright-report packaged-test-results/ || true
- name: Upload directory of test results artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: playwright-results
path: packaged-test-results/
retention-days: 5
- name: create the coverage report
run: |
bun nyc report --reporter=lcov --reporter=text
pnpm exec nyc report --reporter=lcov --reporter=text
- name: Upload the coverage report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-report-pr
path: coverage
@ -160,7 +166,7 @@ jobs:
- name: Build OHIF viewer (CS3D preview)
if: steps.cs3d-check.outputs.enabled == 'true'
run: bun run build:ci
run: pnpm run build:ci
- name: Deploy CS3D preview to Netlify
if: steps.cs3d-check.outputs.enabled == 'true'
@ -201,7 +207,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Check for CS3D branch usage
run: bash .scripts/ci/cs3d-branch-merge-guard.sh
env:

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
# Packages
node_modules
.cursor/
.claude/
.nyc_output/
# Output
build

View File

@ -6,27 +6,21 @@ cd "$(dirname "$0")"
cd .. # Up to project root
# Helpful to verify which versions we're using
echo 'My yarn version is... '
echo 'My pnpm version is... '
yarn -v
pnpm -v
node -v
# Build && Move PWA Output
yarn run build:ci
pnpm run build:ci
mkdir -p ./.netlify/www/pwa
mv platform/app/dist/* .netlify/www/pwa -v
echo 'Web application built and copied'
# Build && Move Docusaurus Output (for the docs themselves)
cd platform/docs
yarn install --frozen-lockfile
yarn run build
cd ../..
pnpm --filter ohif-docs run build
mkdir -p ./.netlify/www/docs
mv platform/docs/build/* .netlify/www/docs -v
echo 'Docs built (docusaurus) and copied'
# Cache all of the node_module dependencies in
# extensions, modules, and platform packages
yarn run lerna:cache
echo 'Nothing left to see here. Go home, folks.'

View File

@ -2,9 +2,8 @@
"name": "root",
"private": true,
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24",
"pnpm": ">=11"
},
"scripts": {
"deploy": "netlify deploy --prod --dir ./../platform/app/dist"

View File

@ -1 +1 @@
20.9.0
24

5
.npmrc Normal file
View File

@ -0,0 +1,5 @@
node-linker=hoisted
strict-peer-dependencies=false
link-workspace-packages=true
prefer-workspace-packages=true
manage-package-manager-versions=false

View File

@ -6,9 +6,9 @@ PROJECT=$1
if [ -z "$PROJECT" ]
then
# Default
npx lerna run dev:viewer
pnpm --filter @ohif/app run dev:viewer
else
eval "npx lerna run dev:$PROJECT"
pnpm --filter @ohif/app run "dev:$PROJECT"
fi
read -p 'Press [Enter] key to continue...'

51
.webpack/resolveConfig.js Normal file
View File

@ -0,0 +1,51 @@
const path = require('path');
// Shared module-resolution rules (alias + module search paths) used by BOTH
// build pipelines so they cannot drift apart:
// - the webpack/rspack build: webpack.base.js -> webpack.pwa.js, plus every
// per-package webpack.prod.js / webpack.dev.js that merges webpack.base.js
// - the rsbuild build: rsbuild.config.ts (dev:fast)
//
// Plugin aliases (writePluginImportsFile.getPluginResolveAliases) are NOT
// included here: they depend on pluginConfig.json and are merged in separately
// by each config.
//
// All paths are anchored to this file's location (the repo-root `.webpack/`
// directory), so the values are identical regardless of which package's build
// is doing the resolving.
const alias = {
// Some extensions import app-level utilities (e.g. history,
// preserveQueryParameters) from '@ohif/app'. pnpm's isolated layout does not
// expose the top-level app package to those extensions, and adding it as a
// workspace dependency would create an app<->default cycle, so we resolve the
// bare specifier to the app source here ($ = exact match).
'@ohif/app$': path.resolve(__dirname, '../platform/app/src/index.js'),
'@': path.resolve(__dirname, '../platform/app/src'),
'@components': path.resolve(__dirname, '../platform/app/src/components'),
'@hooks': path.resolve(__dirname, '../platform/app/src/hooks'),
'@routes': path.resolve(__dirname, '../platform/app/src/routes'),
'@state': path.resolve(__dirname, '../platform/app/src/state'),
};
// Directories to search when resolving modules. The leading bare 'node_modules'
// preserves the default importer-relative walk-up, which pnpm's isolated layout
// requires so that transitive deps (e.g. react-remove-scroll -> tslib 2.x)
// resolve to the sibling copy inside .pnpm/<pkg>/node_modules rather than a
// hoisted older version.
const moduleSearchPaths = [
'node_modules',
path.resolve(__dirname, '../node_modules'),
path.resolve(__dirname, '../../../node_modules'),
path.resolve(__dirname, '../platform/app/node_modules'),
path.resolve(__dirname, '../platform/ui/node_modules'),
];
// Build the resolve.modules array for a build. `srcDir` is the building
// package's source root; it is appended last (matching the previous inline
// behavior in webpack.base.js). Pass nothing to get just the shared paths.
function getModules(srcDir) {
return srcDir ? [...moduleSearchPaths, srcDir] : [...moduleSearchPaths];
}
module.exports = { alias, moduleSearchPaths, getModules };

View File

@ -2,14 +2,14 @@ const autoprefixer = require('autoprefixer');
const path = require('path');
const tailwindcss = require('tailwindcss');
const tailwindConfigPath = path.resolve('../../platform/app/tailwind.config.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const rspack = require('@rspack/core');
const devMode = process.env.NODE_ENV !== 'production';
const cssToJavaScript = {
test: /\.css$/,
use: [
//'style-loader',
devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
devMode ? 'style-loader' : rspack.CssExtractRspackPlugin.loader,
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',

View File

@ -4,6 +4,8 @@ function transpileJavaScript(mode) {
const exclude =
mode === 'production'
? excludeNodeModulesExcept([
// Workspace packages (needed for pnpm shamefully-hoist where they resolve through node_modules)
'@ohif',
// 'dicomweb-client',
// https://github.com/react-dnd/react-dnd/blob/master/babel.config.js
'react-dnd',

View File

@ -4,11 +4,10 @@ const dotenv = require('dotenv');
const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const webpack = require('@rspack/core');
// ~~ PLUGINS
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const TerserJSPlugin = require('terser-webpack-plugin');
// ~~ PackageJSON
// const vtkRules = require('vtk.js/Utilities/config/dependency.js').webpack.core
@ -18,9 +17,15 @@ const TerserJSPlugin = require('terser-webpack-plugin');
const loadWebWorkersRule = require('./rules/loadWebWorkers.js');
const transpileJavaScriptRule = require('./rules/transpileJavaScript.js');
const cssToJavaScript = require('./rules/cssToJavaScript.js');
// Module-resolution rules shared with the rsbuild build (see rsbuild.config.ts).
const resolveConfig = require('./resolveConfig');
// Only uncomment for old v2 stylus
// const stylusToJavaScript = require('./rules/stylusToJavaScript.js');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
let ReactRefreshWebpackPlugin;
try {
const mod = require('@rspack/plugin-react-refresh');
ReactRefreshWebpackPlugin = mod.ReactRefreshRspackPlugin || mod.default || mod;
} catch { ReactRefreshWebpackPlugin = null; }
// ~~ ENV VARS
const NODE_ENV = process.env.NODE_ENV;
@ -66,6 +71,12 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
const config = {
mode: isProdBuild ? 'production' : 'development',
devtool: isProdBuild ? 'source-map' : 'cheap-module-source-map',
// `rspack serve` (@rspack/cli) auto-enables lazyCompilation for web-only
// apps unless the config defines it explicitly. The on-demand proxy chunks
// it produces fail to load in the headless cypress/electron e2e run
// (ChunkLoadError on cornerstone vendor chunks), so disable it here to match
// the rsbuild build (see rsbuild.config.ts `dev.lazyCompilation: false`).
lazyCompilation: false,
entry: ENTRY,
optimization: {
// splitChunks: {
@ -92,9 +103,7 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
children: false,
warnings: true,
},
cache: {
type: 'filesystem',
},
cache: isProdBuild ? false : { type: 'filesystem' },
module: {
noParse: [/(dicomicc)/],
rules: [
@ -168,9 +177,6 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
},
},
cssToJavaScript,
// Note: Only uncomment the following if you are using the old style of stylus in v2
// Also you need to uncomment this platform/app/.webpack/rules/extractStyleChunks.js
// stylusToJavaScript,
{
test: /\.wasm/,
type: 'asset/resource',
@ -194,27 +200,16 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
},
resolve: {
mainFields: ['module', 'browser', 'main'],
// alias and modules are shared with the rsbuild build via ./resolveConfig
// so the two pipelines resolve identically.
alias: {
// Viewer project
'@': path.resolve(__dirname, '../platform/app/src'),
'@components': path.resolve(__dirname, '../platform/app/src/components'),
'@hooks': path.resolve(__dirname, '../platform/app/src/hooks'),
'@routes': path.resolve(__dirname, '../platform/app/src/routes'),
'@state': path.resolve(__dirname, '../platform/app/src/state'),
...resolveConfig.alias,
},
// Which directories to search when resolving modules
modules: [
// Modules specific to this package
path.resolve(__dirname, '../node_modules'),
// Hoisted Yarn Workspace Modules
path.resolve(__dirname, '../../../node_modules'),
path.resolve(__dirname, '../platform/app/node_modules'),
path.resolve(__dirname, '../platform/ui/node_modules'),
SRC_DIR,
],
modules: resolveConfig.getModules(SRC_DIR),
// Attempt to resolve these extensions in order.
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '*'],
// symlinked resources are resolved to their real path, not their symlinked location
// Workspace packages use relative imports between sibling packages.
// Resolve symlinks to keep those imports anchored at the real package paths.
symlinks: true,
fallback: {
fs: false,
@ -223,24 +218,34 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
buffer: require.resolve('buffer'),
},
},
node: {
// Leave __filename / __dirname references alone. The previous 'mock'
// value triggers an rspack warning whenever bundled deps reference
// __dirname (e.g. Emscripten-compiled cornerstone codecs). Those refs
// sit inside `if (ENVIRONMENT_IS_NODE)` branches that never execute in
// the browser, so leaving them un-substituted is harmless at runtime.
__filename: false,
__dirname: false,
},
plugins: [
new webpack.DefinePlugin(defineValues),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
...(isProdBuild ? [] : [new ReactRefreshWebpackPlugin({ overlay: false })]),
new webpack.IgnorePlugin({
resourceRegExp: /^(fs|path)$/,
contextRegExp: /@cornerstonejs[\\/]codec-/,
}),
...(isProdBuild || IS_COVERAGE || !ReactRefreshWebpackPlugin
? []
: [new ReactRefreshWebpackPlugin({ overlay: false })]),
// Uncomment to generate bundle analyzer
// new BundleAnalyzerPlugin(),
],
};
if (isProdBuild) {
config.optimization.minimizer = [
new TerserJSPlugin({
parallel: true,
terserOptions: {},
}),
];
config.optimization.minimizer = [new webpack.SwcJsMinimizerRspackPlugin()];
}
if (isQuickBuild) {

View File

@ -20,49 +20,28 @@
#
# syntax=docker/dockerfile:1.7-labs
# This dockerfile is used to publish the `ohif/app` image on dockerhub.
#
# It's a good example of how to build our static application and package it
# with a web server capable of hosting it as static content.
#
# docker build
# --------------
# If you would like to use this dockerfile to build and tag an image, make sure
# you set the context to the project's root directory:
# https://docs.docker.com/engine/reference/commandline/build/
#
#
# SUMMARY
# --------------
# This dockerfile is used as an input for a second stage to make things run faster.
#
# Stage 1: Build the application
# docker build -t ohif/viewer:latest .
# Copy Files
FROM node:20.18.1-slim as builder
FROM node:24-slim as builder
RUN apt-get update && apt-get install -y build-essential python3
RUN apt-get update && apt-get install -y --no-install-recommends build-essential python3 \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g pnpm@11
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN npm install -g bun@1.2.23
RUN npm install -g lerna@7.4.2
ENV PATH=/usr/src/app/node_modules/.bin:$PATH
# Do an initial install and then a final install
COPY package.json yarn.lock preinstall.js lerna.json ./
COPY --parents ./addOns/package.json ./addOns/*/*/package.json ./extensions/*/package.json ./modes/*/package.json ./platform/*/package.json ./
# Copy package manifests for install caching
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
COPY --parents ./extensions/*/package.json ./modes/*/package.json ./platform/*/package.json ./
# Run the install before copying the rest of the files
RUN bun pm cache rm
RUN bun install
RUN bun add ajv@8.12.0
RUN pnpm install --no-frozen-lockfile
# Copy the local directory
COPY --link --exclude=yarn.lock --exclude=package.json --exclude=Dockerfile . .
COPY --link --exclude=pnpm-lock.yaml --exclude=package.json --exclude=Dockerfile . .
# Build here
# After install it should hopefully be stable until the local directory changes
@ -72,14 +51,14 @@ ARG APP_CONFIG=config/default.js
ARG PUBLIC_URL=/
ENV PUBLIC_URL=${PUBLIC_URL}
RUN bun run show:config
RUN bun run build
RUN pnpm run show:config
RUN pnpm run build
# Precompress files
RUN chmod u+x .docker/compressDist.sh
RUN ./.docker/compressDist.sh
# Stage 3: Bundle the built application into a Docker container
# Stage 2: Bundle the built application into a Docker container
# which runs Nginx using Alpine Linux
FROM nginxinc/nginx-unprivileged:1.27-alpine as final
#RUN apk add --no-cache bash

View File

@ -1,3 +0,0 @@
# External Dependencies
This module contains optional dependencies and external dependencies for including in OHIF, such as the DICOM Microscopy Viewer component.

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +0,0 @@
{
"name": "@externals/devDependencies",
"description": "External dev dependencies - put dev build dependencies here",
"version": "3.13.0-beta.89",
"license": "MIT",
"private": true,
"engines": {
"node": ">=12",
"yarn": ">=1.19.1"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@kitware/vtk.js": "35.5.3",
"clsx": "2.1.1",
"core-js": "3.45.1",
"moment": "2.30.1"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "0.5.17",
"@rsbuild/core": "1.5.1",
"@rsbuild/plugin-node-polyfill": "1.4.2",
"@rsbuild/plugin-react": "1.4.0",
"@svgr/webpack": "8.1.0",
"@swc/helpers": "0.5.17",
"@types/jest": "27.5.2",
"@typescript-eslint/eslint-plugin": "8.56.0",
"@typescript-eslint/parser": "8.56.0",
"autoprefixer": "10.4.21",
"babel-loader": "8.4.1",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "9.1.0",
"cross-env": "7.0.3",
"css-loader": "6.11.0",
"dotenv": "8.6.0",
"eslint": "9.39.3",
"eslint-config-prettier": "7.2.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-cypress": "2.15.2",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.5.1",
"eslint-plugin-promise": "7.2.1",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-tsdoc": "0.2.17",
"execa": "8.0.1",
"extract-css-chunks-webpack-plugin": "4.10.0",
"html-webpack-plugin": "5.6.3",
"husky": "3.1.0",
"jest": "30.2.0",
"jest-canvas-mock": "2.5.2",
"jest-environment-jsdom": "30.2.0",
"jest-junit": "16.0.0",
"lerna": "9.0.4",
"lint-staged": "9.5.0",
"mini-css-extract-plugin": "2.9.2",
"optimize-css-assets-webpack-plugin": "6.0.1",
"postcss": "8.5.6",
"postcss-import": "14.1.0",
"postcss-loader": "6.2.1",
"postcss-preset-env": "7.8.3",
"prettier": "3.6.2",
"prettier-plugin-tailwindcss": "0.6.9",
"react-refresh": "0.14.2",
"semver": "7.7.2",
"serve": "14.2.5",
"shader-loader": "1.3.1",
"shx": "0.3.4",
"source-map-loader": "4.0.2",
"style-loader": "1.3.0",
"terser-webpack-plugin": "5.3.14",
"typescript": "5.5.4",
"unused-webpack-plugin": "2.4.0",
"webpack": "5.105.0",
"webpack-bundle-analyzer": "4.10.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.2.2",
"webpack-hot-middleware": "2.26.1",
"webpack-merge": "5.10.0",
"workbox-webpack-plugin": "6.6.1",
"worker-loader": "3.0.8"
},
"scripts": {
"build": "Included as direct dependency"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
{
"name": "@externals/dicom-microscopy-viewer",
"description": "External reference to dicom-microscopy-viewer",
"version": "3.13.0-beta.89",
"license": "MIT",
"dependencies": {
"dicom-microscopy-viewer": "0.48.17"
}
}

View File

@ -1,50 +0,0 @@
{
"name": "ohif-monorepo-root",
"private": true,
"packageManager": "yarn@1.22.22",
"workspaces": {
"packages": [
"../platform/i18n",
"../platform/core",
"../platform/ui",
"../platform/ui-next",
"../platform/app",
"../extensions/*",
"../modes/*",
"../addOns/externals/*"
],
"nohoist": [
"**/html-minifier-terser"
]
},
"scripts": {
"preinstall": "cd .. && node preinstall.js"
},
"devDependencies": {
"@babel/core": "7.29.7",
"@babel/plugin-transform-class-properties": "7.29.7",
"@babel/plugin-transform-object-rest-spread": "7.29.7",
"@babel/plugin-transform-private-methods": "7.29.7",
"@babel/plugin-transform-private-property-in-object": "7.29.7",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-arrow-functions": "7.29.7",
"@babel/plugin-transform-regenerator": "7.29.7",
"@babel/plugin-transform-runtime": "7.29.7",
"@babel/plugin-transform-typescript": "7.29.7",
"@babel/preset-env": "7.29.7",
"@babel/preset-react": "7.29.7",
"@babel/preset-typescript": "7.29.7"
},
"resolutions": {
"**/@babel/runtime": "7.29.7",
"commander": "8.3.0",
"dcmjs": "0.49.4",
"dicomweb-client": "0.10.4",
"nth-check": "2.1.1",
"trim-newlines": "5.0.0",
"glob-parent": "6.0.2",
"trim": "1.0.1",
"package-json": "8.1.1",
"typescript": "5.5.4"
}
}

10598
bun.lock

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +0,0 @@
[install]
frozenLockfile = true
minimumReleaseAge = 172800
# bun's excludes match exact package names (no glob support). Only the main
# @cornerstonejs/* packages pinned to 5.0.0 are exempted; codecs version separately.
minimumReleaseAgeExcludes = [
"@cornerstonejs/adapters",
"@cornerstonejs/ai",
"@cornerstonejs/core",
"@cornerstonejs/dicom-image-loader",
"@cornerstonejs/labelmap-interpolation",
"@cornerstonejs/metadata",
"@cornerstonejs/polymorphic-segmentation",
"@cornerstonejs/tools",
"@cornerstonejs/utils",
]

View File

@ -1,16 +0,0 @@
[install]
frozenLockfile = false
minimumReleaseAge = 172800
# Mirror of bunfig.toml: exempt the main @cornerstonejs/* packages (just bumped
# to 5.0.0) from the release-age check. Exact names only (no glob support).
minimumReleaseAgeExcludes = [
"@cornerstonejs/adapters",
"@cornerstonejs/ai",
"@cornerstonejs/core",
"@cornerstonejs/dicom-image-loader",
"@cornerstonejs/labelmap-interpolation",
"@cornerstonejs/metadata",
"@cornerstonejs/polymorphic-segmentation",
"@cornerstonejs/tools",
"@cornerstonejs/utils",
]

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-cornerstone-dicom-pmap',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-cornerstone-dicom-pmap',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -4,39 +4,34 @@
"description": "DICOM Parametric Map read workflow",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-cornerstone-dicom-pmap.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-extension"
],
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:dicom-pmap": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev"
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:dicom-pmap": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/i18n": "workspace:*",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
@ -46,8 +41,14 @@
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/adapters": "5.0.0",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/adapters": "5.0.2",
"@cornerstonejs/core": "5.0.2",
"@kitware/vtk.js": "35.5.3"
}
},
"devDependencies": {
"cross-env": "7.0.3"
},
"keywords": [
"ohif-extension"
]
}

View File

@ -1,4 +1,4 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -32,9 +32,11 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-extension-cornerstone-dicom-rt',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-cornerstone-dicom-rt',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -4,8 +4,12 @@
"description": "DICOM RT read workflow",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-cornerstone-dicom-rt.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
@ -14,29 +18,20 @@
"publishConfig": {
"access": "public"
},
"repository": "OHIF/Viewers",
"keywords": [
"ohif-extension"
],
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:dicom-seg": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev"
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:dicom-seg": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/i18n": "workspace:*",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
@ -46,5 +41,11 @@
},
"dependencies": {
"@babel/runtime": "7.29.7"
}
},
"devDependencies": {
"cross-env": "7.0.3"
},
"keywords": [
"ohif-extension"
]
}

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-cornerstone-dicom-seg',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-cornerstone-dicom-seg',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -4,39 +4,34 @@
"description": "DICOM SEG read workflow",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-cornerstone-dicom-seg.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-extension"
],
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:dicom-seg": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev"
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:dicom-seg": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/i18n": "workspace:*",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
@ -46,8 +41,14 @@
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/adapters": "5.0.0",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/adapters": "5.0.2",
"@cornerstonejs/core": "5.0.2",
"@kitware/vtk.js": "35.5.3"
}
},
"devDependencies": {
"cross-env": "7.0.3"
},
"keywords": [
"ohif-extension"
]
}

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -36,9 +36,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-cornerstone-dicom-sr',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-cornerstone-dicom-sr',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-extension-cornerstone-dicom-sr.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -19,25 +17,21 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"ohif-extension"
],
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-measurement-tracking": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/ui": "workspace:*",
"dcmjs": "0.49.4",
"dicom-parser": "1.8.21",
"hammerjs": "2.0.8",
@ -46,9 +40,15 @@
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/adapters": "5.0.0",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/tools": "5.0.0",
"@cornerstonejs/adapters": "5.0.2",
"@cornerstonejs/core": "5.0.2",
"@cornerstonejs/tools": "5.0.2",
"classnames": "2.5.1"
}
},
"devDependencies": {
"cross-env": "7.0.3"
},
"keywords": [
"ohif-extension"
]
}

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-cornerstone',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-cornerstone',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -7,6 +7,9 @@
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-cornerstone-dynamic-volume.umd.js",
"module": "src/index.ts",
"engines": {
"node": ">=24"
},
"exports": {
".": "./src/index.ts",
"./types": "./src/types/index.ts"
@ -19,21 +22,21 @@
"access": "public"
},
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/i18n": "workspace:*",
"@ohif/ui": "workspace:*",
"dcmjs": "0.49.4",
"dicom-parser": "1.8.21",
"hammerjs": "2.0.8",
@ -42,8 +45,11 @@
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/tools": "5.0.0",
"@cornerstonejs/core": "5.0.2",
"@cornerstonejs/tools": "5.0.2",
"classnames": "2.5.1"
},
"devDependencies": {
"cross-env": "7.0.3"
}
}

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-cornerstone',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-cornerstone',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -13,9 +13,7 @@
"./types": "./src/types/index.ts"
},
"engines": {
"node": ">=10",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -26,12 +24,12 @@
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --progress --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
@ -40,9 +38,10 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "1.2.2",
"@cornerstonejs/codec-openjpeg": "1.3.0",
"@cornerstonejs/codec-openjph": "2.4.7",
"@cornerstonejs/dicom-image-loader": "5.0.0",
"@ohif/core": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@cornerstonejs/dicom-image-loader": "5.0.2",
"@ohif/core": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/ui": "workspace:*",
"dcmjs": "0.49.4",
"dicom-parser": "1.8.21",
"hammerjs": "2.0.8",
@ -53,13 +52,13 @@
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/adapters": "5.0.0",
"@cornerstonejs/ai": "5.0.0",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/labelmap-interpolation": "5.0.0",
"@cornerstonejs/metadata": "5.0.0",
"@cornerstonejs/polymorphic-segmentation": "5.0.0",
"@cornerstonejs/tools": "5.0.0",
"@cornerstonejs/adapters": "5.0.2",
"@cornerstonejs/ai": "5.0.2",
"@cornerstonejs/core": "5.0.2",
"@cornerstonejs/labelmap-interpolation": "5.0.2",
"@cornerstonejs/metadata": "5.0.2",
"@cornerstonejs/polymorphic-segmentation": "5.0.2",
"@cornerstonejs/tools": "5.0.2",
"@icr/polyseg-wasm": "0.4.0",
"@itk-wasm/morphological-contour-interpolation": "1.1.0",
"@kitware/vtk.js": "35.5.3",
@ -71,5 +70,8 @@
"lodash.zip": "4.2.0",
"shader-loader": "1.3.1",
"worker-loader": "3.0.8"
},
"devDependencies": {
"cross-env": "7.0.3"
}
}

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-default',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-default',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -7,35 +7,30 @@
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-default.umd.js",
"module": "src/index.ts",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
"node": ">=24"
},
"files": [
"dist",
"README.md"
],
"keywords": [
"ohif-extension"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:dicom-pdf": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:dicom-pdf": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/i18n": "workspace:*",
"dcmjs": "0.49.4",
"dicomweb-client": "0.10.4",
"prop-types": "15.8.1",
@ -43,7 +38,6 @@
"react-dom": "18.3.1",
"react-i18next": "12.3.1",
"react-window": "1.8.11",
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
},
"dependencies": {
@ -52,5 +46,11 @@
"lodash.get": "4.4.2",
"lodash.uniqby": "4.7.0",
"react-color": "2.19.3"
}
},
"devDependencies": {
"webpack-merge": "5.10.0"
},
"keywords": [
"ohif-extension"
]
}

View File

@ -159,7 +159,7 @@ function ViewerLayout({
/>
<div
className="relative flex w-full flex-row flex-nowrap items-stretch overflow-hidden bg-background"
style={{ height: 'calc(100vh - 52px' }}
style={{ height: 'calc(100vh - 52px)' }}
>
<React.Fragment>
{showLoadingIndicator && <LoadingIndicatorProgress className="h-full w-full bg-background" />}

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-dicom-microscopy',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-dicom-microscopy',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [

View File

@ -4,36 +4,31 @@
"description": "OHIF extension for DICOM microscopy",
"author": "Bill Wallace, md-prog",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-dicom-microscopy.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-extension"
],
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:dicom-pdf": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev"
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:dicom-pdf": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/i18n": "workspace:*",
"@ohif/ui": "workspace:*",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
@ -47,7 +42,14 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "1.2.2",
"@cornerstonejs/codec-openjpeg": "1.3.0",
"colormap": "2.3.2",
"dicom-microscopy-viewer": "0.48.6",
"lodash.debounce": "4.0.8",
"mathjs": "12.4.3"
}
},
"devDependencies": {
"cross-env": "7.0.3"
},
"keywords": [
"ohif-extension"
]
}

View File

@ -1,9 +1,9 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const pkg = require('./../package.json');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
@ -37,8 +37,10 @@ module.exports = (env, argv) => {
},
output: {
path: ROOT_DIR,
library: 'ohif-extension-dicom-pdf',
libraryTarget: 'umd',
library: {
name: 'ohif-extension-dicom-pdf',
type: 'umd',
},
filename: `${pkg.main}`,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-extension-dicom-pdf.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -21,17 +19,17 @@
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/ui": "workspace:*",
"dcmjs": "0.49.4",
"dicom-parser": "1.8.21",
"hammerjs": "2.0.8",
@ -41,5 +39,8 @@
"dependencies": {
"@babel/runtime": "7.29.7",
"classnames": "2.5.1"
},
"devDependencies": {
"cross-env": "7.0.3"
}
}

View File

@ -1,4 +1,4 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -32,9 +32,11 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-extension-dicom-video',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-dicom-video',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-extension-dicom-video.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -21,17 +19,17 @@
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/ui": "workspace:*",
"dcmjs": "0.49.4",
"dicom-parser": "1.8.21",
"hammerjs": "2.0.8",
@ -41,5 +39,8 @@
"dependencies": {
"@babel/runtime": "7.29.7",
"classnames": "2.5.1"
},
"devDependencies": {
"cross-env": "7.0.3"
}
}

View File

@ -1,7 +1,7 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-extension-measurement-tracking',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-measurement-tracking',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -7,50 +7,50 @@
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-measurement-tracking.umd.js",
"module": "src/index.tsx",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
"node": ">=24"
},
"files": [
"dist",
"README.md"
],
"keywords": [
"ohif-extension"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:dicom-pdf": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev"
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:dicom-pdf": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev"
},
"peerDependencies": {
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/tools": "5.0.0",
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@cornerstonejs/core": "5.0.2",
"@cornerstonejs/tools": "5.0.2",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/ui": "workspace:*",
"classnames": "2.5.1",
"dcmjs": "0.49.4",
"lodash.debounce": "4.0.8",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/ui": "workspace:*",
"@xstate/react": "3.2.2",
"xstate": "4.38.3"
}
},
"devDependencies": {
"webpack-merge": "5.10.0"
},
"keywords": [
"ohif-extension"
]
}

View File

@ -1,4 +1,4 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -32,10 +32,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-extension-test',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-extension-test',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-extension-test.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -21,17 +19,17 @@
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package-1": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package-1": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/ui": "workspace:*",
"dcmjs": "0.49.4",
"dicom-parser": "1.8.21",
"hammerjs": "2.0.8",
@ -41,5 +39,8 @@
"dependencies": {
"@babel/runtime": "7.29.7",
"classnames": "2.5.1"
},
"devDependencies": {
"cross-env": "7.0.3"
}
}

View File

@ -1,4 +1,4 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -7,7 +7,7 @@ const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const ENTRY = {
app: `${SRC_DIR}/index.tsx`,
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-extension-tmtv',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-tmtv',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-extension-tmtv.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -21,17 +19,17 @@
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/ui": "workspace:*",
"dcmjs": "0.49.4",
"dicom-parser": "1.8.21",
"hammerjs": "2.0.8",
@ -41,5 +39,8 @@
"dependencies": {
"@babel/runtime": "7.29.7",
"classnames": "2.5.1"
},
"devDependencies": {
"cross-env": "7.0.3"
}
}

View File

@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
@ -35,9 +35,11 @@ module.exports = (env, argv) => {
sideEffects: true,
},
output: {
library: {
name: 'ohif-extension-default',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-extension-default',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -4,31 +4,26 @@
"description": "",
"author": "Rodrigo Basilio",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-extension-ultrasound-pleura-bline.umd.js",
"publishConfig": {
"access": "public"
"module": "src/index.ts",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-extension"
],
"module": "src/index.ts",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
"publishConfig": {
"access": "public"
},
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:my-extension": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev"
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:my-extension": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev"
},
"peerDependencies": {
"prop-types": "15.8.1",
@ -37,18 +32,17 @@
"react-i18next": "12.3.1",
"react-router": "6.30.3",
"react-router-dom": "6.30.3",
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/tools": "5.0.0",
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/ui-next": "3.13.0-beta.89"
"@cornerstonejs/core": "5.0.2",
"@cornerstonejs/tools": "5.0.2",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/i18n": "workspace:*",
"@ohif/ui-next": "workspace:*"
},
"devDependencies": {
"@babel/core": "7.29.7",
@ -66,12 +60,11 @@
"@babel/preset-typescript": "7.29.7",
"@svgr/webpack": "8.1.0",
"babel-loader": "8.4.1",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "9.1.0",
"cross-env": "7.0.3",
"dotenv": "8.6.0",
"webpack": "5.105.0",
"webpack-cli": "5.1.4",
"webpack-merge": "5.10.0"
}
},
"keywords": [
"ohif-extension"
]
}

View File

@ -1,5 +0,0 @@
{
"version": "3.13.0-beta.89",
"packages": ["extensions/*", "platform/*", "modes/*", "addOns/externals/*"],
"npmClient": "yarn"
}

View File

@ -1,4 +1,4 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -32,9 +32,11 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-basic-dev',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-mode-basic-dev',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-mode-basic-dev-mode.umd.js",
"module": "src/index.ts",
"engines": {
"node": ">=10",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -21,29 +19,28 @@
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-dicom-pdf": "3.13.0-beta.89",
"@ohif/extension-dicom-video": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/extension-dicom-pdf": "workspace:*",
"@ohif/extension-dicom-video": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"i18next": "17.3.1"
},
"devDependencies": {
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
}
}

View File

@ -1,7 +1,7 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -34,10 +34,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-basic-test',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-mode-basic-test',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-mode-test.umd.js",
"module": "src/index.ts",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -19,36 +17,35 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"ohif-mode"
],
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-dicom-pdf": "3.13.0-beta.89",
"@ohif/extension-dicom-video": "3.13.0-beta.89",
"@ohif/extension-measurement-tracking": "3.13.0-beta.89",
"@ohif/extension-test": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/extension-dicom-pdf": "workspace:*",
"@ohif/extension-dicom-video": "workspace:*",
"@ohif/extension-measurement-tracking": "workspace:*",
"@ohif/extension-test": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"i18next": "17.3.1"
},
"devDependencies": {
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
}
},
"keywords": [
"ohif-mode"
]
}

View File

@ -1,4 +1,4 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
@ -32,10 +32,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-basic',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-mode-basic',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -4,46 +4,43 @@
"description": "A basic mode used to build other modes on top of",
"author": "OHIF Contributors",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-mode-basic.js",
"module": "src/index.tsx",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-mode"
],
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"scripts": {
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-rt": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-seg": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-dicom-pdf": "3.13.0-beta.89",
"@ohif/extension-dicom-video": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-cornerstone-dicom-rt": "workspace:*",
"@ohif/extension-cornerstone-dicom-seg": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/extension-dicom-pdf": "workspace:*",
"@ohif/extension-dicom-video": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7"
},
"devDependencies": {
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
},
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
}
"keywords": [
"ohif-mode"
]
}

View File

@ -1,4 +1,4 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
@ -32,10 +32,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-longitudinal',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-mode-longitudinal',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-mode-longitudinal.js",
"module": "src/index.ts",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -19,38 +17,37 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"ohif-mode"
],
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-rt": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-seg": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-dicom-pdf": "3.13.0-beta.89",
"@ohif/extension-dicom-video": "3.13.0-beta.89",
"@ohif/extension-measurement-tracking": "3.13.0-beta.89",
"@ohif/mode-basic": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-cornerstone-dicom-rt": "workspace:*",
"@ohif/extension-cornerstone-dicom-seg": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/extension-dicom-pdf": "workspace:*",
"@ohif/extension-dicom-video": "workspace:*",
"@ohif/extension-measurement-tracking": "workspace:*",
"@ohif/mode-basic": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"i18next": "17.3.1"
},
"devDependencies": {
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
}
},
"keywords": [
"ohif-mode"
]
}

View File

@ -1,7 +1,7 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -33,10 +33,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-microscopy',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-mode-microscopy',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -4,42 +4,44 @@
"description": "OHIF mode for DICOM microscopy",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-mode-microscopy.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-mode"
],
"publishConfig": {
"access": "public"
},
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-dicom-microscopy": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-dicom-microscopy": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"i18next": "17.3.1"
}
},
"devDependencies": {
"cross-env": "7.0.3",
"webpack-merge": "5.10.0"
},
"keywords": [
"ohif-mode"
]
}

View File

@ -1,7 +1,7 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -33,10 +33,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-preclinical-4d',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-mode-preclinical-4d',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/index.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist/**",
@ -20,31 +18,31 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"ohif-mode"
],
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-seg": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dynamic-volume": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-tmtv": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-cornerstone-dicom-seg": "workspace:*",
"@ohif/extension-cornerstone-dynamic-volume": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/extension-tmtv": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7"
},
"devDependencies": {
"webpack": "5.105.0",
"cross-env": "7.0.3",
"webpack-merge": "5.10.0"
}
},
"keywords": [
"ohif-mode"
]
}

View File

@ -11,12 +11,14 @@ const config = {
entry: rootDir + '/' + pkg.module,
devtool: 'source-map',
output: {
library: {
name: pkg.name,
type: 'umd',
umdNamedDefine: true,
},
path: outputFolder,
filename: outputFile,
library: pkg.name,
libraryTarget: 'umd',
chunkFilename: '[name].chunk.js',
umdNamedDefine: true,
globalObject: "typeof self !== 'undefined' ? self : this",
},
externals: [

View File

@ -4,46 +4,41 @@
"description": "OHIF segmentation mode which enables labelmap segmentation read/edit/export",
"author": "@ohif",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/umd/@ohif/mode-segmentation/index.umd.js",
"module": "src/index.tsx",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-mode"
],
"publishConfig": {
"access": "public"
},
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=7",
"yarn": ">=1.16.0"
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-rt": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-seg": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-dicom-pdf": "3.13.0-beta.89",
"@ohif/extension-dicom-video": "3.13.0-beta.89",
"@ohif/mode-basic": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-cornerstone-dicom-rt": "workspace:*",
"@ohif/extension-cornerstone-dicom-seg": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/extension-dicom-pdf": "workspace:*",
"@ohif/extension-dicom-video": "workspace:*",
"@ohif/mode-basic": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7",
@ -64,12 +59,11 @@
"@babel/preset-typescript": "7.29.7",
"@svgr/webpack": "8.1.0",
"babel-loader": "8.4.1",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "9.1.0",
"cross-env": "7.0.3",
"dotenv": "8.6.0",
"webpack": "5.105.0",
"webpack-cli": "5.1.4",
"webpack-merge": "5.10.0"
}
},
"keywords": [
"ohif-mode"
]
}

View File

@ -1,7 +1,7 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -34,10 +34,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-tmtv',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-mode-tmtv',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -8,9 +8,7 @@
"main": "dist/ohif-mode-tmtv.umd.js",
"module": "src/index.ts",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24"
},
"files": [
"dist",
@ -19,35 +17,34 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"ohif-mode"
],
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-dicom-pdf": "3.13.0-beta.89",
"@ohif/extension-dicom-video": "3.13.0-beta.89",
"@ohif/extension-measurement-tracking": "3.13.0-beta.89"
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-default": "workspace:*",
"@ohif/extension-dicom-pdf": "workspace:*",
"@ohif/extension-dicom-video": "workspace:*",
"@ohif/extension-measurement-tracking": "workspace:*"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"i18next": "17.3.1"
},
"devDependencies": {
"webpack": "5.105.0",
"webpack-merge": "5.10.0"
}
},
"keywords": [
"ohif-mode"
]
}

View File

@ -1,7 +1,7 @@
const webpack = require('webpack');
const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
const pkg = require('./../package.json');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
@ -34,10 +34,12 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-mode-tmtv',
type: 'umd',
export: 'default',
},
path: ROOT_DIR,
library: 'ohif-mode-tmtv',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],

View File

@ -4,41 +4,36 @@
"description": "Allows users to annotate ultrasound images with pleura B-line annotations.",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-mode-ultrasound-pleura-bline.umd.js",
"module": "src/index.ts",
"engines": {
"node": ">=24"
},
"files": [
"dist/**",
"public/**",
"README.md"
],
"repository": "OHIF/Viewers",
"keywords": [
"ohif-mode"
],
"publishConfig": {
"access": "public"
},
"module": "src/index.ts",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
},
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"dev": "cross-env NODE_ENV=development rspack build --config .webpack/webpack.dev.js --watch",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/tools": "5.0.0",
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-ultrasound-pleura-bline": "3.13.0-beta.89",
"@cornerstonejs/core": "5.0.2",
"@cornerstonejs/tools": "5.0.2",
"@ohif/core": "workspace:*",
"@ohif/extension-cornerstone-dicom-sr": "workspace:*",
"@ohif/extension-ultrasound-pleura-bline": "workspace:*",
"i18next": "17.3.1"
},
"devDependencies": {
@ -56,12 +51,11 @@
"@babel/preset-typescript": "7.29.7",
"@svgr/webpack": "8.1.0",
"babel-loader": "8.4.1",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "9.1.0",
"cross-env": "7.0.3",
"dotenv": "8.6.0",
"webpack": "5.105.0",
"webpack-cli": "5.1.4",
"webpack-merge": "5.10.0"
}
},
"keywords": [
"ohif-mode"
]
}

View File

@ -1,26 +0,0 @@
#!/bin/sh
NODE_MODULES_CACHE="./node_modules"
LERNA_CACHE="$NODE_MODULES_CACHE/lerna-cache"
echo "Running netlify-lerna-cache.sh"
mkdir -p "$NODE_MODULES_CACHE/lerna-cache"
cache_deps() {
PACKAGES=$(ls -1 $1)
for PKG in $PACKAGES
do
PKG_NODE_MODULES="$1/$PKG/node_modules"
if [ -d $PKG_NODE_MODULES ];
then
mv $PKG_NODE_MODULES $LERNA_CACHE/$PKG
echo "Cached node modules for $PKG"
else
echo "Unable to cache node modules for $PKG"
fi
done
}
cache_deps platform
cache_deps extensions
cache_deps modes

View File

@ -1,27 +0,0 @@
#!/bin/sh
NODE_MODULES_CACHE="./node_modules"
LERNA_CACHE="$NODE_MODULES_CACHE/lerna-cache"
echo "Running netlify-lerna-restore.sh"
mkdir -p "$NODE_MODULES_CACHE/lerna-cache"
echo "$NODE_MODULES_CACHE/lerna-cache/*"
restore_deps() {
PACKAGES=$(ls -1 $1)
for PKG in $PACKAGES
do
PKG_CACHE="$LERNA_CACHE/$PKG"
if [ -d $PKG_CACHE ];
then
mv $PKG_CACHE $1/$PKG/node_modules
echo "Restored node modules for $PKG"
else
echo "Unable to restore cache for $PKG"
fi
done
}
restore_deps platform
restore_deps extensions
restore_deps modes

View File

@ -6,34 +6,24 @@
# We use Netlify for deploy previews and for publishing docs (gh-pages branch).
# https://viewer.ohif.org is created using a different process that is
# managed by CircleCI and deployed to our Google Hosting
#
[build]
base = ""
build = "yarn run build:viewer:ci"
publish = "dist"
command = "pnpm run build:ci"
publish = "platform/app/dist"
# NODE_VERSION in root `.nvmrc` takes priority
# YARN_FLAGS: https://www.netlify.com/docs/build-gotchas/#yarn
[build.environment]
# If 'production', `yarn install` does not install devDependencies
# If 'production', `pnpm install` does not install devDependencies
NODE_ENV = "development"
NODE_VERSION = "20.19.0"
YARN_VERSION = "1.22.5"
RUBY_VERSION = "2.6.2"
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
NETLIFY_USE_YARN = "true"
NODE_VERSION = "24"
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
# Multi-key header rules are expressed with multi-line strings.
cache-control = '''
max-age=0,
no-cache,

85
nx.json
View File

@ -1,85 +0,0 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": [
"dev",
"build",
"test:unit",
"test:unit:ci",
"test",
"test:e2e",
"test:e2e:local",
"test:e2e:dist",
"test:e2e:serve",
"build:viewer",
"build:dev",
"build:aws",
"build:viewer:ci",
"build:viewer:qa",
"build:viewer:demo",
"build"
]
}
}
},
"targetDefaults": {
"test:unit": {
"dependsOn": [
"^test:unit"
]
},
"test:unit:ci": {
"dependsOn": [
"^test:unit:ci"
]
},
"test": {
"dependsOn": [
"^test"
]
},
"test:e2e": {
"dependsOn": [
"^test:e2e"
]
},
"test:e2e:headed": {
"dependsOn": [
"^test:e2e:headed"
]
},
"test:e2e:local": {
"dependsOn": [
"^test:e2e:local"
]
},
"test:e2e:dist": {
"dependsOn": [
"^test:e2e:dist"
]
},
"test:e2e:serve": {
"dependsOn": [
"^test:e2e:serve"
]
},
"build": {
"outputs": [
"{projectRoot}/platform/app/dist"
]
}
},
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"sharedGlobals": [],
"production": [
"default"
]
}
}

View File

@ -1,98 +1,72 @@
{
"name": "ohif-monorepo-root",
"private": true,
"workspaces": {
"packages": [
"platform/app",
"platform/cli",
"platform/ui-next",
"platform/ui",
"platform/core",
"platform/i18n",
"extensions/*",
"modes/*",
"addOns/externals/*"
],
"nohoist": [
"**/html-minifier-terser"
]
},
"packageManager": "pnpm@11.5.2",
"engines": {
"node": ">=18",
"npm": ">=6",
"yarn": ">=1.20.0"
"node": ">=24",
"pnpm": ">=11"
},
"scripts": {
"cm": "npx git-cz",
"build": "lerna run build:viewer --stream",
"build:dev": "lerna run build:dev --stream",
"build:ci": "lerna run build:viewer:ci --stream",
"build:qa": "lerna run build:viewer:qa --stream",
"clean": "npx lerna run clean --stream",
"clean:deep": "npx lerna run clean:deep --stream",
"cli": "node ./platform/cli/src/index.js",
"build:ui:deploy-preview": "lerna run build:ui:deploy-preview --stream",
"build:demo": "lerna run build:viewer:demo --stream",
"build:package-all": "lerna run build:package --stream --concurrency 4",
"build:package-all-1": "lerna run build:package-1 --stream --concurrency 4",
"dev:fast": "cd platform/app && yarn run dev:fast",
"show:config": "echo Config is $APP_CONFIG on $PUBLIC_URL",
"dev": "lerna run dev:viewer --stream",
"dev:no:cache": "lerna run dev:no:cache --stream",
"dev:project": ".scripts/dev.sh",
"dev:orthanc": "lerna run dev:orthanc --stream",
"dev:orthanc:no:cache": "lerna run dev:orthanc:no:cache --stream",
"dev:dcm4chee": "lerna run dev:dcm4chee --stream",
"dev:static": "lerna run dev:static --stream",
"orthanc:up": "docker compose -f platform/app/.recipes/Nginx-Orthanc/docker-compose.yml up",
"install:dev": "cp -f yarn.lock addOns/yarn.lock && cd addOns && yarn install --frozen-lockfile --modules-folder ../node_modules",
"install:update-lockfile": "yarn install && bun install --config=./bunfig.update-lockfile.toml",
"install:yarn:frozen-lockfile": "echo Deprecated - use install:frozen && yarn install --frozen-lockfile",
"install:frozen": "yarn install --frozen-lockfile",
"audit": "bun audit --ignore=GHSA-3ppc-4f35-3m26 --ignore=GHSA-7r86-cg39-jmmj --ignore=GHSA-23c5-xmqv-rm74 --ignore=GHSA-c2c7-rcm5-vvqj",
"preinstall": "node preinstall.js",
"start": "yarn run dev",
"test": "yarn run test:unit",
"cm": "npx git-cz",
"build": "pnpm --filter @ohif/app run build:viewer",
"build:dev": "pnpm --filter @ohif/app run build:dev",
"build:ci": "pnpm --filter @ohif/app run build:viewer:ci",
"build:qa": "pnpm --filter @ohif/app run build:viewer:qa",
"clean": "pnpm -r run clean",
"clean:deep": "pnpm -r run clean:deep",
"cli": "node ./platform/cli/src/index.js",
"build:demo": "pnpm --filter @ohif/app run build:viewer:demo",
"build:package-all": "pnpm -r run build:package",
"build:package-all-1": "pnpm -r run build:package-1",
"dev:fast": "pnpm --filter @ohif/app run dev:fast",
"show:config": "echo Config is $APP_CONFIG on $PUBLIC_URL",
"dev": "pnpm --filter @ohif/app run dev:viewer",
"dev:no:cache": "pnpm --filter @ohif/app run dev:no:cache",
"dev:project": ".scripts/dev.sh",
"dev:orthanc": "pnpm --filter @ohif/app run dev:orthanc",
"dev:orthanc:no:cache": "pnpm --filter @ohif/app run dev:orthanc:no:cache",
"dev:dcm4chee": "pnpm --filter @ohif/app run dev:dcm4chee",
"dev:static": "pnpm --filter @ohif/app run dev:static",
"orthanc:up": "docker compose -f platform/app/.recipes/Nginx-Orthanc/docker-compose.yml up",
"install:update-lockfile": "pnpm install --no-frozen-lockfile",
"install:frozen": "pnpm install --frozen-lockfile",
"audit": "pnpm audit",
"start": "pnpm run dev",
"test": "pnpm run test:unit",
"test:data": "git submodule update --init -f testdata",
"test-watch": "jest --collectCoverage --watchAll",
"test:unit": "jest --collectCoverage",
"test:unit:ci": "lerna run test:unit:ci --parallel --stream",
"test:e2e": "lerna run test:e2e --stream",
"test:e2e:coverage": "nyc --reporter=html yarn run test:e2e:ci",
"test:e2e:ci": "cross-env TEST_ENV=true npx playwright test",
"test:e2e:ui": "cross-env TEST_ENV=true npx playwright test --ui",
"test:e2e:reporter": "cross-env TEST_ENV=true npx playwright test --reporter=html",
"test:e2e:update": "cross-env TEST_ENV=true npx playwright test --reporter=html --update-snapshots -g shouldUpdateThis",
"test:e2e:update:debug": "cross-env TEST_ENV=true npx playwright test -g @debug --reporter=html --update-snapshots -g shouldUpdateThis",
"test:e2e:headed": "cross-env TEST_ENV=true npx playwright test --headed",
"test:e2e:debug": "cross-env TEST_ENV=true npx playwright test --debug",
"test:e2e:dist": "lerna run test:e2e:dist --stream",
"test:e2e:serve": "yarn test:data && lerna run test:e2e:serve --stream",
"test:unit:ci": "pnpm -r run test:unit:ci",
"test:e2e": "cross-env TEST_ENV=true pnpm exec playwright test",
"test:e2e:coverage": "nyc --reporter=html pnpm run test:e2e:ci",
"test:e2e:ci": "cross-env TEST_ENV=true pnpm exec playwright test",
"test:e2e:ui": "cross-env TEST_ENV=true pnpm exec playwright test --ui",
"test:e2e:reporter": "cross-env TEST_ENV=true pnpm exec playwright test --reporter=html",
"test:e2e:update": "cross-env TEST_ENV=true pnpm exec playwright test --reporter=html --update-snapshots -g shouldUpdateThis",
"test:e2e:update:debug": "cross-env TEST_ENV=true pnpm exec playwright test -g @debug --reporter=html --update-snapshots -g shouldUpdateThis",
"test:e2e:headed": "cross-env TEST_ENV=true pnpm exec playwright test --headed",
"test:e2e:debug": "cross-env TEST_ENV=true pnpm exec playwright test --debug",
"test:e2e:dist": "pnpm --filter @ohif/app run test:e2e:dist",
"test:e2e:serve": "pnpm run test:data && pnpm --filter @ohif/app run test:e2e:serve",
"review:screenshots": "node scripts/screenshot-reviewer.mjs",
"see-changed": "lerna changed",
"docs:preview": "lerna run docs:preview --stream",
"docs:dev": "pnpm --filter ohif-docs run dev",
"docs:build": "pnpm --filter ohif-docs run build",
"docs:preview": "pnpm --filter ohif-docs run serve",
"docs:publish": "chmod +x ./build-and-publish-docs.sh && ./build-and-publish-docs.sh",
"release": "yarn run lerna:version && yarn run lerna:publish",
"lerna:clean": "lerna clean",
"lerna:cache": "./netlify-lerna-cache.sh",
"lerna:restore": "./netlify-lerna-restore.sh",
"lerna:customVersion": "node version.mjs",
"version:custom": "node version.mjs",
"link-list": "npm ls --depth=0 --link=true",
"cs3d:checkout": "cd libs/@cornerstonejs && git fetch && git checkout",
"cs3d:check": "node .scripts/cs3d-check.mjs",
"cs3d:build": "cd libs/@cornerstonejs && yarn run build:esm",
"cs3d:watch": "cd libs/@cornerstonejs && yarn run build:esm:watch",
"cs3d:install": "cd libs/@cornerstonejs && yarn install",
"cs3d:build": "cd libs/@cornerstonejs && pnpm run build:esm",
"cs3d:watch": "cd libs/@cornerstonejs && pnpm run build:esm:watch",
"cs3d:install": "cd libs/@cornerstonejs && pnpm install",
"cs3d:link": "node libs/@cornerstonejs/scripts/link-ohif-cornerstone-node-modules.mjs .",
"cs3d:unlink": "node libs/@cornerstonejs/scripts/unlink-ohif-cornerstone-node-modules.mjs ."
},
"dependencies": {
"execa": "8.0.1"
},
"optionalDependencies": {
"@percy/cypress": "3.1.6",
"@playwright/test": "1.56.1"
},
"devDependencies": {
"@babel/core": "7.29.7",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
@ -109,7 +83,10 @@
"@babel/preset-react": "7.29.7",
"@babel/preset-typescript": "7.29.7",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.17",
"@rsbuild/core": "1.7.3",
"@rsbuild/plugin-node-polyfill": "1.4.4",
"@rsbuild/plugin-react": "1.4.5",
"babel-jest": "29.7.0",
"babel-loader": "8.4.1",
"babel-plugin-istanbul": "7.0.1",
"babel-plugin-transform-import-meta": "2.3.3",
@ -118,6 +95,10 @@
"cypress": "14.5.2",
"cypress-file-upload": "5.0.8",
"file-loader": "6.2.0",
"identity-obj-proxy": "3.0.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-junit": "6.4.0",
"nyc": "17.1.0",
"playwright-test-coverage": "1.2.12",
"postcss-loader": "6.2.1",
@ -126,10 +107,12 @@
"shader-loader": "1.3.1",
"source-map-support": "0.5.21",
"style-loader": "1.3.0",
"terser-webpack-plugin": "5.3.14",
"ts-node": "10.9.2",
"worker-loader": "3.0.8"
},
"optionalDependencies": {
"@playwright/test": "1.56.1"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
@ -140,38 +123,5 @@
"prettier --write",
"git add"
]
},
"resolutions": {
"commander": "8.3.0",
"cross-env": "7.0.3",
"cross-spawn": "7.0.6",
"dcmjs": "0.49.4",
"path-to-regexp": "0.1.13",
"nth-check": "2.1.1",
"trim-newlines": "5.0.0",
"glob-parent": "6.0.2",
"trim": "1.0.1",
"package-json": "8.1.1",
"rollup": "2.80.0",
"body-parser": "1.20.3",
"axios": "1.17.0",
"core-js": "3.45.1",
"tapable": "2.2.2",
"@cornerstonejs/codec-openjpeg": "1.3.0",
"node-forge": "1.4.0",
"qs": "6.14.1",
"lodash": "4.18.1",
"lodash-es": "4.18.1",
"diff": "5.2.2",
"webpack": "5.105.0",
"tar": "7.5.11",
"serialize-javascript": "7.0.4",
"svgo": "3.3.3",
"flatted": "3.4.2",
"handlebars": "4.7.9",
"protobufjs": "7.5.7",
"tmp": "0.2.6",
"shell-quote": "1.8.4"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
}

View File

@ -1,35 +0,0 @@
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
function extractStyleChunks(isProdBuild) {
return [
// If you are using the old stylus, you should uncomment this
// {
// test: /\.styl$/,
// use: [
// {
// loader: ExtractCssChunksPlugin.loader,
// options: {
// hot: !isProdBuild,
// },
// },
// { loader: 'css-loader' },
// { loader: 'stylus-loader' },
// ],
// },
{
test: /\.(sa|sc|c)ss$/,
use: [
{
loader: ExtractCssChunksPlugin.loader,
options: {
hot: !isProdBuild,
},
},
'css-loader',
'postcss-loader',
],
},
];
}
module.exports = extractStyleChunks;

View File

@ -1,15 +1,10 @@
// https://developers.google.com/web/tools/workbox/guides/codelabs/webpack
// ~~ WebPack
const path = require('path');
const fs = require('fs');
const { merge } = require('webpack-merge');
const webpack = require('webpack');
const rspack = require('@rspack/core');
const webpackBase = require('./../../../.webpack/webpack.base.js');
// ~~ Plugins
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { InjectManifest } = require('workbox-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// ~~ Directories
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
@ -31,13 +26,61 @@ const IS_COVERAGE = process.env.COVERAGE === 'true';
const OHIF_PORT = Number(process.env.OHIF_PORT || 3000);
const ENTRY_TARGET = process.env.ENTRY_TARGET || `${SRC_DIR}/index.js`;
const Dotenv = require('dotenv-webpack');
const dotenv = require('dotenv');
dotenv.config();
const writePluginImportFile = require('./writePluginImportsFile.js');
// const MillionLint = require('@million/lint');
const open = process.env.OHIF_OPEN !== 'false';
const copyPluginFromExtensions = writePluginImportFile(SRC_DIR, DIST_DIR);
class InjectServiceWorkerManifestPlugin {
constructor({ swSrc, swDest, publicPath, exclude, maximumFileSizeToCacheInBytes }) {
this.swSrc = swSrc;
this.swDest = swDest;
this.publicPath = publicPath;
this.exclude = exclude;
this.maximumFileSizeToCacheInBytes = maximumFileSizeToCacheInBytes;
}
apply(compiler) {
const pluginName = 'InjectServiceWorkerManifestPlugin';
const publicPath = this.publicPath.endsWith('/') ? this.publicPath : `${this.publicPath}/`;
compiler.hooks.thisCompilation.tap(pluginName, compilation => {
compilation.hooks.processAssets.tap(
{
name: pluginName,
stage: rspack.Compilation.PROCESS_ASSETS_STAGE_REPORT,
},
() => {
const manifest = compilation
.getAssets()
.filter(asset => {
if (asset.name === this.swDest || asset.name.endsWith('.map')) {
return false;
}
if (this.exclude.some(pattern => pattern.test(asset.name))) {
return false;
}
return asset.source.size() <= this.maximumFileSizeToCacheInBytes;
})
.map(asset => ({
url: `${publicPath}${asset.name}`,
revision: asset.info.contenthash ? null : compilation.hash,
}));
const source = fs
.readFileSync(this.swSrc, 'utf8')
.replace('self.__WB_MANIFEST', JSON.stringify(manifest));
compilation.emitAsset(this.swDest, new rspack.sources.RawSource(source));
}
);
});
}
}
const setHeaders = (res, path) => {
if (path.indexOf('.gz') !== -1) {
res.setHeader('Content-Encoding', 'gzip');
@ -67,6 +110,7 @@ module.exports = (env, argv) => {
app: ENTRY_TARGET,
},
output: {
clean: true,
path: DIST_DIR,
filename: isProdBuild ? '[name].bundle.[chunkhash].js' : '[name].js',
publicPath: PUBLIC_URL, // Used by HtmlWebPackPlugin for asset prefix
@ -79,22 +123,22 @@ module.exports = (env, argv) => {
},
},
resolve: {
// Resolve every extension/mode declared in pluginConfig.json to its
// workspace source, so the dynamic import()s in pluginImports.js link
// without the plugins being dependencies of platform/app. Merged with the
// base aliases (webpack-merge deep-merges resolve.alias).
alias: writePluginImportFile.getPluginResolveAliases(),
modules: [
// Modules specific to this package
// Preserve importer-relative node_modules walk-up for pnpm.
'node_modules',
path.resolve(__dirname, '../node_modules'),
// Hoisted Yarn Workspace Modules
path.resolve(__dirname, '../../../node_modules'),
SRC_DIR,
],
},
plugins: [
// For debugging re-renders
// MillionLint.webpack(),
new Dotenv(),
// Clean output.path
new CleanWebpackPlugin(),
// Copy "Public" Folder to Dist
new CopyWebpackPlugin({
// Copy "Public" Folder to Dist (rspack built-in)
new rspack.CopyRspackPlugin({
patterns: [
...copyPluginFromExtensions,
{
@ -102,8 +146,6 @@ module.exports = (env, argv) => {
to: DIST_DIR,
toType: 'dir',
globOptions: {
// Ignore our HtmlWebpackPlugin template file
// Ignore our configuration files
ignore: ['**/config/**', '**/html-templates/**', '.DS_Store'],
},
},
@ -111,37 +153,33 @@ module.exports = (env, argv) => {
from: '../../../node_modules/onnxruntime-web/dist',
to: `${DIST_DIR}/ort`,
},
// Short term solution to make sure GCloud config is available in output
// for our docker implementation
{
from: `${PUBLIC_DIR}/config/google.js`,
to: `${DIST_DIR}/google.js`,
},
// Copy over and rename our target app config file
{
from: `${PUBLIC_DIR}/${APP_CONFIG}`,
to: `${DIST_DIR}/app-config.js`,
},
],
}),
// Generate "index.html" w/ correct includes/imports
new HtmlWebpackPlugin({
// Generate "index.html" w/ correct includes/imports (rspack built-in)
new rspack.HtmlRspackPlugin({
template: `${PUBLIC_DIR}/html-templates/${HTML_TEMPLATE}`,
filename: 'index.html',
templateParameters: {
PUBLIC_URL: PUBLIC_URL,
},
}),
// Generate a service worker for fast local loads
// Generate a service worker for fast local loads.
...(IS_COVERAGE
? []
: [
new InjectManifest({
new InjectServiceWorkerManifestPlugin({
swDest: 'sw.js',
swSrc: path.join(SRC_DIR, 'service-worker.js'),
// Need to exclude the theme as it is updated independently
publicPath: PUBLIC_URL,
exclude: [/theme/],
// Cache large files for the manifests to avoid warning messages
maximumFileSizeToCacheInBytes: 1024 * 1024 * 50,
}),
]),
@ -156,11 +194,15 @@ module.exports = (env, argv) => {
open,
port: OHIF_PORT,
client: {
overlay: { errors: true, warnings: false },
// During e2e (COVERAGE=true) disable the dev-server overlay: its
// injected iframe intercepts pointer events and breaks Playwright/Cypress
// clicks. Keep it for normal local dev.
overlay: IS_COVERAGE ? false : { errors: true, warnings: false },
},
proxy: [
{
'/dicomweb': 'http://localhost:5000',
context: ['/dicomweb'],
target: 'http://localhost:5000',
},
],
static: [
@ -173,13 +215,15 @@ module.exports = (env, argv) => {
setHeaders,
},
publicPath: '/viewer-testdata',
watch: false,
},
],
//public: 'http://localhost:' + 3000,
//writeToDisk: true,
historyApiFallback: {
disableDotRule: true,
disableDotRule: !IS_COVERAGE,
index: PUBLIC_URL + 'index.html',
htmlAcceptHeaders: ['text/html'],
},
devMiddleware: {
writeToDisk: true,
@ -203,7 +247,7 @@ module.exports = (env, argv) => {
if (isProdBuild) {
mergedConfig.plugins.push(
new MiniCssExtractPlugin({
new rspack.CssExtractRspackPlugin({
filename: '[name].bundle.css',
chunkFilename: '[id].css',
})

View File

@ -1,6 +1,7 @@
const pluginConfig = require('../pluginConfig.json');
const fs = require('fs');
const os = require('os');
const path = require('path');
const autogenerationDisclaimer = `
// THIS FILE IS AUTOGENERATED AS PART OF THE EXTENSION AND MODE PLUGIN PROCESS.
@ -107,20 +108,144 @@ function getRuntimeLoadModesExtensions(modules) {
return dynamicLoad.join('\n');
}
const fromDirectory = (srcDir, path) => {
if (!path) return;
if (path[0] === '.') return srcDir + '/../../..' + path.substring(1);
if (path[0] === '~') return os.homedir() + path.substring(1);
return path;
const fromDirectory = (srcDir, dirPath) => {
if (!dirPath) return;
if (dirPath[0] === '.') return srcDir + '/../../..' + dirPath.substring(1);
if (dirPath[0] === '~') return os.homedir() + dirPath.substring(1);
return dirPath;
};
const createCopyPluginToDistForLink = (srcDir, distDir, plugins, folderName) => {
const APP_SRC_DIR = path.resolve(__dirname, '../src');
const REPO_ROOT = path.resolve(__dirname, '../../../');
// The set of plugin package names declared in pluginConfig.json. Resolution and
// asset copying are driven entirely by this list — a package present in the
// extensions/ or modes/ workspaces but NOT listed here is ignored, and an
// external (out-of-tree) package listed here with a `directory` is included.
let declaredPluginNamesCache;
function getDeclaredPluginNames() {
if (declaredPluginNamesCache) {
return declaredPluginNamesCache;
}
const names = new Set();
for (const entry of [...(pluginConfig.extensions || []), ...(pluginConfig.modes || [])]) {
const name = extractName(entry);
if (name) {
names.add(name);
}
}
declaredPluginNamesCache = names;
return names;
}
// Map each in-tree plugin's real package name to its directory, but ONLY for the
// plugins declared in pluginConfig.json. This lets the bundler resolve those
// plugins from their source without them being dependencies of platform/app
// (and therefore without entries in package.json / the lockfile), while leaving
// undeclared workspace packages out of the build entirely.
let workspacePluginDirsCache;
function getWorkspacePluginDirs() {
if (workspacePluginDirsCache) {
return workspacePluginDirsCache;
}
const declared = getDeclaredPluginNames();
const map = {};
for (const group of ['extensions', 'modes']) {
const root = path.join(REPO_ROOT, group);
if (!fs.existsSync(root)) {
continue;
}
for (const dir of fs.readdirSync(root)) {
const pkgJsonPath = path.join(root, dir, 'package.json');
if (!fs.existsSync(pkgJsonPath)) {
continue;
}
try {
const { name } = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
if (name && declared.has(name)) {
map[name] = path.join(root, dir);
}
} catch {
// ignore an unparseable package.json
}
}
}
workspacePluginDirsCache = map;
return map;
}
// Source directory of a workspace plugin: an explicit `directory` override wins
// (out-of-tree plugins), otherwise look it up among the in-tree workspaces by
// package name. Returns undefined for an external plugin that is instead
// installed as a normal dependency (resolved from node_modules — see
// pluginAssetDir and getPluginResolveAliases).
function workspacePluginDir(plugin) {
if (plugin.directory) {
return fromDirectory(APP_SRC_DIR, plugin.directory);
}
return getWorkspacePluginDirs()[extractName(plugin)];
}
// Where a plugin's copyable assets (public/, dist/) live. In-tree and
// `directory`-overridden plugins use their source dir; anything else declared
// in pluginConfig falls back to node_modules. This is what lets an external
// extension/mode be included by adding it to the root package.json as a normal
// dependency (e.g. third-party packages such as dicom-microscopy-viewer).
function pluginAssetDir(plugin) {
const dir = workspacePluginDir(plugin);
if (dir) {
return dir;
}
const name = extractName(plugin);
const inNodeModules = name && path.join(REPO_ROOT, 'node_modules', name);
return inNodeModules && fs.existsSync(inNodeModules) ? inNodeModules : undefined;
}
// Alias map fed into webpack `resolve.alias`. The trailing `$` makes each alias
// an EXACT match for the bare package specifier that the generated
// pluginImports.js imports, so deep subpath imports (e.g.
// `@ohif/extension-cornerstone/types`) still flow through normal resolution and
// honor each package's `exports` map.
//
// Only in-tree / `directory`-overridden plugins get an alias. An external
// plugin installed as a root dependency intentionally gets none: its bare
// specifier then resolves through webpack's normal node_modules walk-up
// (resolve.modules includes the repo-root node_modules), exactly like any other
// installed package.
function getPluginResolveAliases() {
const alias = {};
for (const entry of [...(pluginConfig.extensions || []), ...(pluginConfig.modes || [])]) {
const name = extractName(entry);
const dir = workspacePluginDir(entry);
if (name && dir) {
alias[`${name}$`] = dir;
}
}
return alias;
}
// Build CopyPlugin patterns for a set of plugins.
//
// For `public`-section entries (literalDirectory=true) a `directory` is the
// asset source itself — e.g. `./platform/public` or
// dicom-microscopy-viewer's prebuilt dist folder — so it is copied directly.
//
// For extension/mode entries a `directory` is instead the package ROOT (it
// doubles as the resolve alias target), so we copy its <folderName> (public/
// or dist/) subdirectory, exactly as we do for in-tree and node_modules
// plugins. This keeps an out-of-tree extension's assets landing in the same
// place as an in-tree one.
const createCopyPluginToDist = (distDir, plugins, folderName, { literalDirectory = false } = {}) => {
return plugins
.map(plugin => {
const fromDir = fromDirectory(srcDir, plugin.directory);
const from = fromDir || `${srcDir}/../node_modules/${plugin.packageName}/${folderName}/`;
const exists = fs.existsSync(from);
return exists
let from;
if (literalDirectory && plugin.directory) {
from = fromDirectory(APP_SRC_DIR, plugin.directory);
} else {
const dir = pluginAssetDir(plugin);
from = dir && path.join(dir, folderName);
}
return from && fs.existsSync(from)
? {
from,
to: `${distDir}${plugin.to || ''}`,
@ -128,23 +253,7 @@ const createCopyPluginToDistForLink = (srcDir, distDir, plugins, folderName) =>
}
: undefined;
})
.filter(x => !!x);
};
const createCopyPluginToDistForBuild = (SRC_DIR, DIST_DIR, plugins, folderName) => {
return plugins
.map(plugin => {
const from = `${SRC_DIR}/../../../node_modules/${plugin.packageName}/${folderName}/`;
const exists = fs.existsSync(from);
return exists
? {
from,
to: DIST_DIR,
toType: 'dir',
}
: undefined;
})
.filter(x => !!x);
.filter(Boolean);
};
function writePluginImportsFile(SRC_DIR, DIST_DIR) {
@ -175,46 +284,35 @@ function writePluginImportsFile(SRC_DIR, DIST_DIR) {
}
});
// Build packages using cli add-mode and add-extension
// will get added to the root node_modules, but the linked packages
// will be hosted at the viewer node_modules.
const copyPluginPublicToDistBuild = createCopyPluginToDistForBuild(
SRC_DIR,
// Copy each extension/mode's static `public/` assets into the app dist.
// Plugins are resolved from their source dir (see pluginAssetDir), so this
// works whether they are in-tree, out-of-tree (`directory`), or installed as
// dependencies of platform/app.
const copyPluginPublicToDist = createCopyPluginToDist(
DIST_DIR,
[...pluginConfig.modes, ...pluginConfig.extensions],
'public'
);
const copyPluginPublicToDistLink = createCopyPluginToDistForLink(
SRC_DIR,
DIST_DIR,
[...pluginConfig.modes, ...pluginConfig.extensions, ...pluginConfig.public],
'public'
);
// Temporary way to copy chunks from the dist folder so that the become
// available
const copyPluginDistToDistBuild = createCopyPluginToDistForBuild(
SRC_DIR,
// Some extensions/modes ship prebuilt chunks/workers/wasm in dist/; copy them
// if present.
const copyPluginDistToDist = createCopyPluginToDist(
DIST_DIR,
[...pluginConfig.modes, ...pluginConfig.extensions],
'dist'
);
const copyPluginDistToDistLink = createCopyPluginToDistForLink(
SRC_DIR,
// `public`-section entries (e.g. ./platform/public, dicom-microscopy-viewer)
// point `directory` at the asset folder itself, so copy it verbatim.
const copyPublicSectionToDist = createCopyPluginToDist(
DIST_DIR,
[...pluginConfig.modes, ...pluginConfig.extensions],
'dist'
pluginConfig.public || [],
'public',
{ literalDirectory: true }
);
return [
...copyPluginPublicToDistBuild,
...copyPluginPublicToDistLink,
...copyPluginDistToDistBuild,
...copyPluginDistToDistLink,
];
return [...copyPluginPublicToDist, ...copyPluginDistToDist, ...copyPublicSectionToDist];
}
module.exports = writePluginImportsFile;
module.exports.getPluginResolveAliases = getPluginResolveAliases;

View File

@ -7,13 +7,20 @@ export default defineConfig({
supportFile: 'cypress/support/index.js',
setupNodeEvents(on, config) {
on('before:browser:launch', (browser, launchOptions) => {
// `args` is an array of all the arguments that will
// be passed to browsers when it launches
console.log(launchOptions.args); // print all current args
console.log('***', browser.family, browser.name, '***');
// Headless/no-GPU runs fall back to software WebGL, and newer Chromium
// deprecated that implicit fallback (destabilizes canvas rendering).
// Opt back in explicitly. Electron does NOT support launchOptions.args
// (it warns and ignores them) — it gets this flag via the
// ELECTRON_EXTRA_LAUNCH_ARGS env var (see .circleci/config.yml). So only
// push it for real Chromium browsers (e.g. chrome) used locally.
if (browser.family === 'chromium' && browser.name !== 'electron') {
if (!launchOptions.args.includes('--enable-unsafe-swiftshader')) {
launchOptions.args.push('--enable-unsafe-swiftshader');
}
}
// whatever you return here becomes the launchOptions
return launchOptions;
});

View File

@ -34,7 +34,6 @@
// Visual test comparison
cy.screenshot('Save Measurements - new measurement added');
cy.percyCanvasSnapshot('Save Measurements - new measurement added');
});
// it('retrieves saved measurements', function() {

View File

@ -1,4 +1,3 @@
import '@percy/cypress';
import 'cypress-file-upload';
import { DragSimulator } from './DragSimulator.js';
import {
@ -20,7 +19,7 @@ import {
Cypress.Commands.add('selectLayoutPreset', (presetName, screenshot) => {
cy.get('[data-cy="Layout"]').click();
if (screenshot) {
cy.percyCanvasSnapshot('Layout tool opened');
cy.screenshot('Layout tool opened');
}
cy.get('div').contains(presetName).should('be.visible').click();
// fixed wait time for layout changes and rendering
@ -391,24 +390,6 @@ Cypress.Commands.add('isInViewport', element => {
});
});
/**
* Percy.io Canvas screenshot workaround
*
*/
Cypress.Commands.add('percyCanvasSnapshot', (name, options = {}) => {
cy.document().then(doc => {
convertCanvas(doc);
});
// `domTransformation` does not appear to be working
// But modifying our immediate DOM does.
cy.percySnapshot(name, { ...options }); //, domTransformation: convertCanvas });
cy.document().then(doc => {
unconvertCanvas(doc);
});
});
Cypress.Commands.add('setLayout', (columns = 1, rows = 1) => {
cy.get('[data-cy="Layout"]').click();
@ -418,38 +399,6 @@ Cypress.Commands.add('setLayout', (columns = 1, rows = 1) => {
cy.waitDicomImage();
});
function convertCanvas(documentClone) {
documentClone.querySelectorAll('canvas').forEach(selector => canvasToImage(selector));
return documentClone;
}
function unconvertCanvas(documentClone) {
// Remove previously generated images
documentClone.querySelectorAll('[data-percy-image]').forEach(selector => selector.remove());
// Restore canvas visibility
documentClone.querySelectorAll('[data-percy-canvas]').forEach(selector => {
selector.removeAttribute('data-percy-canvas');
selector.style = '';
});
}
function canvasToImage(selectorOrEl) {
let canvas =
typeof selectorOrEl === 'object' ? selectorOrEl : document.querySelector(selectorOrEl);
let image = document.createElement('img');
let canvasImageBase64 = canvas.toDataURL('image/png');
// Show Image
image.src = canvasImageBase64;
image.style = 'width: 100%';
image.setAttribute('data-percy-image', true);
// Hide Canvas
canvas.setAttribute('data-percy-canvas', true);
canvas.parentElement.appendChild(image);
canvas.style = 'display: none';
}
//Initialize aliases for User Preferences modal
Cypress.Commands.add('initPreferencesModalAliases', () => {
initPreferencesModalAliases();

View File

@ -8,73 +8,55 @@
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "src/index.js",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
},
"proxy": "http://localhost:8042",
"scripts": {
"build:viewer": "cross-env NODE_ENV=production yarn run build",
"build:dev": "cross-env NODE_ENV=development yarn run build",
"build:aws": "cross-env NODE_ENV=development APP_CONFIG=config/aws_static.js yarn run build && gzip -9 -r dist",
"version:update": "cd ../.. && node ./version.mjs && cd platform/app",
"build:viewer:ci": "yarn run version:update && cross-env NODE_ENV=production PUBLIC_URL=/ APP_CONFIG=config/netlify.js QUICK_BUILD=false yarn run build",
"build:viewer:qa": "cross-env NODE_ENV=production APP_CONFIG=config/google.js yarn run build",
"build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html QUICK_BUILD=false yarn run build",
"build": "node --max_old_space_size=8096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js",
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"dev:fast": "rsbuild dev --config ../../rsbuild.config.ts",
"dev": "cross-env NODE_ENV=development webpack serve --config .webpack/webpack.pwa.js",
"dev:no:cache": "cross-env NODE_ENV=development webpack serve --no-cache --config .webpack/webpack.pwa.js",
"dev:orthanc": "cross-env NODE_ENV=development PROXY_TARGET=http://localhost:3000/pacs/dicom-web PROXY_DOMAIN=http://localhost:8042 PROXY_PATH_REWRITE_FROM=/pacs/dicom-web PROXY_PATH_REWRITE_TO=/dicom-web APP_CONFIG=config/docker-nginx-orthanc.js webpack serve --config .webpack/webpack.pwa.js",
"dev:orthanc:no:cache": "cross-env NODE_ENV=development PROXY_TARGET=http://localhost:3000/pacs/dicom-web PROXY_DOMAIN=http://localhost:8042 PROXY_PATH_REWRITE_FROM=/pacs/dicom-web PROXY_PATH_REWRITE_TO=/dicom-web APP_CONFIG=config/docker-nginx-orthanc.js webpack serve --no-cache --config .webpack/webpack.pwa.js",
"dev:dcm4chee": "cross-env NODE_ENV=development APP_CONFIG=config/local_dcm4chee.js webpack serve --config .webpack/webpack.pwa.js",
"dev:static": "cross-env NODE_ENV=development APP_CONFIG=config/local_static.js webpack serve --config .webpack/webpack.pwa.js",
"dev:viewer": "yarn run dev",
"start": "yarn run dev",
"test:e2e": "cypress open",
"test:e2e:local": "cypress run --config video=false --browser chrome --spec 'cypress/integration/common/**/*,cypress/integration/pwa/**/*'",
"test:e2e:serve": "cross-env APP_CONFIG=config/e2e.js yarn start",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage",
"ci:generateSuccessVersion": "node -p -e \"require('./package.json').version\" > success_version.txt"
"node": ">=24"
},
"files": [
"dist",
"README.md"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build:viewer": "cross-env NODE_ENV=production pnpm run build",
"build:dev": "cross-env NODE_ENV=development pnpm run build",
"build:aws": "cross-env NODE_ENV=development APP_CONFIG=config/aws_static.js pnpm run build && gzip -9 -r dist",
"version:update": "cd ../.. && node ./version.mjs && cd platform/app",
"build:viewer:ci": "pnpm run version:update && cross-env NODE_ENV=production PUBLIC_URL=/ APP_CONFIG=config/netlify.js QUICK_BUILD=false pnpm run build",
"build:viewer:qa": "cross-env NODE_ENV=production APP_CONFIG=config/google.js pnpm run build",
"build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html QUICK_BUILD=false pnpm run build",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=24576 rspack build --config .webpack/webpack.pwa.js",
"clean": "shx rm -rf dist",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev:fast": "cross-env NODE_OPTIONS=--max-old-space-size=16384 rsbuild dev --config ../../rsbuild.config.ts",
"dev": "cross-env NODE_ENV=development rspack serve --config .webpack/webpack.pwa.js",
"dev:no:cache": "cross-env NODE_ENV=development rspack serve --config .webpack/webpack.pwa.js",
"dev:orthanc": "cross-env NODE_ENV=development PROXY_TARGET=http://localhost:3000/pacs/dicom-web PROXY_DOMAIN=http://localhost:8042 PROXY_PATH_REWRITE_FROM=/pacs/dicom-web PROXY_PATH_REWRITE_TO=/dicom-web APP_CONFIG=config/docker-nginx-orthanc.js rspack serve --config .webpack/webpack.pwa.js",
"dev:orthanc:no:cache": "cross-env NODE_ENV=development PROXY_TARGET=http://localhost:3000/pacs/dicom-web PROXY_DOMAIN=http://localhost:8042 PROXY_PATH_REWRITE_FROM=/pacs/dicom-web PROXY_PATH_REWRITE_TO=/dicom-web APP_CONFIG=config/docker-nginx-orthanc.js rspack serve --config .webpack/webpack.pwa.js",
"dev:dcm4chee": "cross-env NODE_ENV=development APP_CONFIG=config/local_dcm4chee.js rspack serve --config .webpack/webpack.pwa.js",
"dev:static": "cross-env NODE_ENV=development APP_CONFIG=config/local_static.js rspack serve --config .webpack/webpack.pwa.js",
"dev:viewer": "pnpm run dev",
"start": "pnpm run dev",
"test:e2e": "cypress open",
"test:e2e:local": "cypress run --config video=false --browser chrome --spec 'cypress/integration/common/**/*,cypress/integration/pwa/**/*'",
"test:e2e:serve": "cross-env APP_CONFIG=config/e2e.js pnpm start",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage",
"ci:generateSuccessVersion": "node -p -e \"require('./package.json').version\" > success_version.txt"
},
"dependencies": {
"@babel/runtime": "7.29.7",
"@cornerstonejs/codec-charls": "1.2.3",
"@cornerstonejs/codec-libjpeg-turbo-8bit": "1.2.2",
"@cornerstonejs/codec-openjpeg": "1.3.0",
"@cornerstonejs/codec-openjph": "2.4.7",
"@cornerstonejs/dicom-image-loader": "5.0.0",
"@cornerstonejs/dicom-image-loader": "5.0.2",
"@emotion/serialize": "1.3.3",
"@ohif/core": "3.13.0-beta.89",
"@ohif/extension-cornerstone": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-rt": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-seg": "3.13.0-beta.89",
"@ohif/extension-cornerstone-dicom-sr": "3.13.0-beta.89",
"@ohif/extension-default": "3.13.0-beta.89",
"@ohif/extension-dicom-microscopy": "3.13.0-beta.89",
"@ohif/extension-dicom-pdf": "3.13.0-beta.89",
"@ohif/extension-dicom-video": "3.13.0-beta.89",
"@ohif/extension-test": "3.13.0-beta.89",
"@ohif/extension-ultrasound-pleura-bline": "3.13.0-beta.89",
"@ohif/i18n": "3.13.0-beta.89",
"@ohif/mode-basic-dev-mode": "3.13.0-beta.89",
"@ohif/mode-longitudinal": "3.13.0-beta.89",
"@ohif/mode-microscopy": "3.13.0-beta.89",
"@ohif/mode-test": "3.13.0-beta.89",
"@ohif/mode-ultrasound-pleura-bline": "3.13.0-beta.89",
"@ohif/ui": "3.13.0-beta.89",
"@ohif/ui-next": "3.13.0-beta.89",
"@ohif/core": "workspace:*",
"@ohif/i18n": "workspace:*",
"@ohif/ui": "workspace:*",
"@ohif/ui-next": "workspace:*",
"@svgr/webpack": "8.1.0",
"@types/react": "18.3.23",
"classnames": "2.5.1",
@ -83,7 +65,6 @@
"dcmjs": "0.49.4",
"detect-gpu": "4.0.50",
"dicom-parser": "1.8.21",
"dotenv-webpack": "1.8.0",
"file-loader": "6.2.0",
"hammerjs": "2.0.8",
"history": "5.3.0",
@ -108,19 +89,17 @@
},
"devDependencies": {
"@babel/plugin-transform-private-methods": "7.29.7",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.17",
"@rspack/cli": "^2.0.0",
"@rspack/core": "^2.0.0",
"@rspack/dev-server": "^2.0.0",
"@rspack/plugin-react-refresh": "^2.0.0",
"@types/node": "20.19.9",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "10.2.4",
"cross-env": "7.0.3",
"extract-css-chunks-webpack-plugin": "4.10.0",
"html-webpack-plugin": "5.6.3",
"identity-obj-proxy": "3.0.x",
"mini-css-extract-plugin": "2.9.2",
"shx": "0.3.4",
"tailwindcss": "3.2.4",
"terser-webpack-plugin": "5.3.14",
"webpack-dev-server": "5.2.2",
"workbox-webpack-plugin": "6.6.1"
}
"tailwindcss": "3.2.4"
},
"productVersion": "3.4.0",
"proxy": "http://localhost:8042"
}

View File

@ -8,14 +8,15 @@ module.exports = {
// }),
presets: [require('../ui/tailwind.config.js'), require('../ui-next/tailwind.config.js')],
content: [
'./src/**/*.{jsx,js,ts,tsx, css}',
'../../extensions/**/*.{jsx,js,ts,tsx, css}',
'../ui/src/**/*.{jsx,js,ts,tsx, css}',
'../../modes/**/*.{jsx,js,ts,tsx, css}',
'./node_modules/@ohif/ui/src/**/*.{js,jsx,ts,tsx, css}',
'./src/**/*.{jsx,js,ts,tsx,css}',
'../../extensions/*/src/**/*.{jsx,js,ts,tsx,css}',
'../ui/src/**/*.{jsx,js,ts,tsx,css}',
'../ui-next/src/**/*.{jsx,js,ts,tsx,css}',
'../../modes/*/src/**/*.{jsx,js,ts,tsx,css}',
'./node_modules/@ohif/ui/src/**/*.{js,jsx,ts,tsx,css}',
'../../node_modules/@ohif/ui/src/**/*.{js,jsx,ts,tsx,css}',
'../../node_modules/@ohif/ui-next/src/**/*.{js,jsx,ts,tsx,css}',
'../../node_modules/@ohif/extension-*/src/**/*.{js,jsx,css, ts,tsx}',
'../../node_modules/@ohif/extension-*/src/**/*.{js,jsx,ts,tsx,css}',
],
theme: {
fontFamily: {

View File

@ -10,7 +10,7 @@
},
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
@ -33,8 +33,7 @@
"pkg-install": "1.0.0",
"registry-url": "6.0.1",
"spdx-license-list": "6.10.0",
"util": "0.12.5",
"yarn-programmatic": "0.1.2"
"util": "0.12.5"
},
"files": [
"bin/",

View File

@ -62,13 +62,13 @@ const createPackage = async options => {
console.log(chalk.green(`run the following command inside the root of the OHIF monorepo`));
console.log();
console.log(chalk.green.bold(` yarn run cli link-${packageType} ${options.targetDir}`));
console.log(chalk.green.bold(` pnpm run cli link-${packageType} ${JSON.stringify(options.targetDir)}`));
console.log();
console.log(
chalk.yellow("and when you don't need it anymore, run the following command to unlink it")
);
console.log();
console.log(chalk.yellow(` yarn run cli unlink-${packageType} ${options.name}`));
console.log(chalk.yellow(` pnpm run cli unlink-${packageType} ${JSON.stringify(options.name)}`));
console.log();
return true;

View File

@ -1,5 +1,6 @@
import { info } from 'yarn-programmatic';
import { execa } from 'execa';
export default async function getYarnInfo(packageName) {
return await info(packageName);
const { stdout } = await execa('npm', ['info', packageName, '--json']);
return JSON.parse(stdout);
}

View File

@ -1,10 +1,7 @@
import { remove } from 'yarn-programmatic';
import { execa } from 'execa';
const uninstallNPMPackage = async packageName => {
// TODO - Anoyingly pkg-install doesn't seem to have uninstall.
// So since we are using yarn we will just use yarn here, but the tool
// is certainly less generic. But its a super minor issue.
await remove(packageName).catch(err => {
await execa('pnpm', ['remove', packageName]).catch(err => {
console.log(err);
});
};

View File

@ -78,7 +78,7 @@ function _createPackage(packageType) {
// for now ohif-cli is ran through yarn only.
// see ohif-cli.md section # OHIF Command Line Interface for reference.
const program = new Command('yarn run cli');
const program = new Command('pnpm run cli');
// Todo: inject with webpack
program
.version('2.0.7')
@ -156,7 +156,7 @@ program
unlinkExtension(extensionName, { viewerDirectory });
console.log(
chalk.green(
`Successfully unlinked Extension ${extensionName} from the Viewer, don't forget to run yarn install --frozen-lockfile --force`
`Successfully unlinked Extension ${extensionName} from the Viewer, don't forget to run pnpm install`
)
);
});
@ -179,7 +179,7 @@ program
unlinkMode(modeName, { viewerDirectory });
console.log(
chalk.green(
`Successfully unlinked Mode ${modeName} from the Viewer, don't forget to run yarn install --frozen-lockfile --force`
`Successfully unlinked Mode ${modeName} from the Viewer, don't forget to run pnpm install`
)
);
});

View File

@ -12,13 +12,15 @@ const config = {
entry: rootDir + '/' + pkg.module,
devtool: 'source-map',
output: {
library: {
type: 'umd',
umdNamedDefine: true,
},
path: outputFolder,
filename: outputFile,
library: pkg.name,
libraryTarget: 'umd',
chunkFilename: '[name].chunk.js',
umdNamedDefine: true,
globalObject: "typeof self !== 'undefined' ? self : this",
chunkFilename: '[name].chunk.js',
globalObject: "typeof self !== 'undefined' ? self : this",
},
externals: [
{

View File

@ -3,16 +3,15 @@
"keywords": ["ohif-extension"],
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.18.0"
"node": ">=24",
"pnpm": ">=11"
},
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:my-extension": "yarn run dev",
"dev:my-extension": "pnpm run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev"
"build:package": "pnpm run build",
"start": "pnpm run dev"
},
"peerDependencies": {
"@ohif/core": "^{LATEST_OHIF_VERSION}",

View File

@ -11,13 +11,15 @@ const config = {
entry: rootDir + '/' + pkg.module,
devtool: 'source-map',
output: {
library: {
type: 'umd',
umdNamedDefine: true,
},
path: outputFolder,
filename: outputFile,
library: pkg.name,
libraryTarget: 'umd',
chunkFilename: '[name].chunk.js',
umdNamedDefine: true,
globalObject: "typeof self !== 'undefined' ? self : this",
chunkFilename: '[name].chunk.js',
globalObject: "typeof self !== 'undefined' ? self : this",
},
externals: [
{

View File

@ -3,16 +3,15 @@
"keywords": ["ohif-mode"],
"module": "src/index.tsx",
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"node": ">=24",
"pnpm": ">=11"
},
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"dev:cornerstone": "pnpm run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},

View File

@ -31,9 +31,11 @@ module.exports = (env, argv) => {
sideEffects: false,
},
output: {
library: {
name: 'ohif-core',
type: 'umd',
},
path: ROOT_DIR,
library: 'ohif-core',
libraryTarget: 'umd',
filename: pkg.main,
},
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@cornerstonejs/],

View File

@ -8,27 +8,25 @@
"main": "dist/ohif-core.umd.js",
"module": "src/index.ts",
"types": "src/types/index.ts",
"sideEffects": "false",
"publishConfig": {
"access": "public"
"engines": {
"node": ">=24"
},
"files": [
"dist",
"README.md"
],
"engines": {
"node": ">=14",
"npm": ">=6",
"yarn": ">=1.16.0"
"publishConfig": {
"access": "public"
},
"sideEffects": "false",
"scripts": {
"clean": "shx rm -rf dist",
"clean:deep": "yarn run clean && shx rm -rf node_modules",
"clean:deep": "pnpm run clean && shx rm -rf node_modules",
"dev": "jest --watchAll",
"dev:core": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"start": "yarn run dev",
"dev:core": "pnpm run dev",
"build": "cross-env NODE_ENV=production rspack build --config .webpack/webpack.prod.js",
"build:package": "pnpm run build",
"start": "pnpm run dev",
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage"
},
@ -37,10 +35,10 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "1.2.2",
"@cornerstonejs/codec-openjpeg": "1.3.0",
"@cornerstonejs/codec-openjph": "2.4.7",
"@cornerstonejs/core": "5.0.0",
"@cornerstonejs/dicom-image-loader": "5.0.0",
"@cornerstonejs/metadata": "5.0.0",
"@ohif/ui": "3.13.0-beta.89",
"@cornerstonejs/core": "5.0.2",
"@cornerstonejs/dicom-image-loader": "5.0.2",
"@cornerstonejs/metadata": "5.0.2",
"@ohif/ui": "workspace:*",
"cornerstone-math": "0.1.10",
"dicom-parser": "1.8.21"
},

Binary file not shown.

View File

@ -0,0 +1,403 @@
---
sidebar_position: 4
sidebar_label: Build Tooling (Rspack)
title: Webpack to Rspack v2
summary: 3.13 swaps Webpack for Rspack v2 across the monorepo. This guide covers the new build commands, plugin replacements, and how to update custom extensions that ship their own webpack config.
---
# Webpack to Rspack v2
OHIF 3.13 replaces Webpack with [Rspack](https://rspack.dev) v2 as the
default bundler for the app, every extension, every mode, and the
`@ohif/ui-next` / `@ohif/ui` / `@ohif/i18n` / `@ohif/core` packages.
:::caution The `.webpack/` files are now Rspack configs
The directory layout and filenames are unchanged — you will still find
`.webpack/webpack.base.js`, `.webpack/webpack.pwa.js`, and a
`.webpack/webpack.prod.js` in each package. **Despite the `webpack` name,
these files now configure Rspack.** They `require('@rspack/core')` (aliased
to a local `webpack` variable so the rest of the config reads the same) and
are run by the `rspack` CLI. The names were kept to minimize churn and keep
custom-extension forks merging cleanly — do not assume a file called
`webpack.*.js` runs Webpack.
:::
There is no Webpack fallback. Webpack and all of its plugins have been
removed from the dependency tree; the only supported bundler is Rspack
(plus Rsbuild for the `dev:fast` path, see below).
## Why Rspack
Rspack is API-compatible with most of the Webpack v5 plugin ecosystem
but written in Rust. For the OHIF tree the practical wins are:
- 3-5x faster cold builds and `--watch` rebuilds.
- Built-in SWC minification (no separate `terser-webpack-plugin`).
- First-party drop-in replacements for the plugins that previously
ate the bulk of build time (`MiniCssExtractPlugin`, `CopyWebpackPlugin`,
`HtmlWebpackPlugin`).
## New scripts
`platform/app/package.json` was rewritten to invoke `rspack` instead of
`webpack`:
```diff
- "build": "node --max_old_space_size=8096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js",
+ "build": "cross-env NODE_OPTIONS=--max-old-space-size=24576 rspack build --config .webpack/webpack.pwa.js",
- "dev": "cross-env NODE_ENV=development webpack serve --config .webpack/webpack.pwa.js",
+ "dev": "cross-env NODE_ENV=development rspack serve --config .webpack/webpack.pwa.js",
- "dev:orthanc": "… webpack serve --config .webpack/webpack.pwa.js",
+ "dev:orthanc": "… rspack serve --config .webpack/webpack.pwa.js"
```
Notes:
- The build now requests `--max-old-space-size=24576` (24 GB) via
`NODE_OPTIONS`. The previous 8 GB limit is no longer enough for full
prod builds.
- `webpack serve` is replaced by `rspack serve`. All `dev:*` variants
(`dev:orthanc`, `dev:dcm4chee`, `dev:static`, …) were updated the same way.
- `dev:no:cache` no longer passes `--no-cache` (Rspack's CLI does not
expose it). It is now identical to `dev`; production caching is disabled
unconditionally in the config instead (see "Caching" below).
- `dev:fast` runs **Rsbuild** rather than Rspack directly
(`rsbuild dev --config ../../rsbuild.config.ts`). Rsbuild is the
higher-level toolchain built on Rspack; it is used only for the fast
dev-server path and is configured separately in `rsbuild.config.ts`.
## Dependency changes
`platform/app/package.json` (and every other workspace package that ships a
`.webpack/webpack.prod.js`) **adds**:
```json
{
"devDependencies": {
"@rspack/cli": "^2.0.0",
"@rspack/core": "^2.0.0",
"@rspack/dev-server": "^2.0.0",
"@rspack/plugin-react-refresh": "^2.0.0"
}
}
```
and **removes** the Webpack toolchain that is no longer used:
```diff
- "webpack": "5.105.0",
- "@pmmmwh/react-refresh-webpack-plugin": "0.5.17",
- "clean-webpack-plugin": "4.0.0",
- "copy-webpack-plugin": "10.2.4",
- "html-webpack-plugin": "5.6.3",
- "terser-webpack-plugin": "5.3.14",
- "webpack-dev-server": "5.2.2",
- "workbox-webpack-plugin": "6.6.1",
- "dotenv-webpack": "1.8.0",
- "extract-css-chunks-webpack-plugin": "4.10.0",
```
(`webpack-merge` is kept — Rspack configs still use it to merge the base
and per-package configs.)
The root `rsbuild.config.ts` path additionally depends on `@rsbuild/core`,
`@rsbuild/plugin-react`, and `@rsbuild/plugin-node-polyfill`.
## Shared base config (`.webpack/webpack.base.js`)
`webpack.base.js` is the file most consumers extend in their own
extensions. It now requires `@rspack/core` instead of `webpack`:
```diff
- const webpack = require('webpack');
+ const webpack = require('@rspack/core');
```
Rspack exports the same `DefinePlugin`, `ProvidePlugin`, and
`IgnorePlugin` constructors under the same names, so most plugin code
is unchanged — which is why the local variable is still called `webpack`.
### Plugin replacements
| 3.12 (Webpack) | 3.13 (Rspack) |
|-----------------------------------------|---------------------------------------------------------------|
| `mini-css-extract-plugin` | `require('@rspack/core').CssExtractRspackPlugin` |
| `clean-webpack-plugin` | `output: { clean: true }` |
| `copy-webpack-plugin` | `require('@rspack/core').CopyRspackPlugin` |
| `html-webpack-plugin` | `require('@rspack/core').HtmlRspackPlugin` |
| `@pmmmwh/react-refresh-webpack-plugin` | `require('@rspack/plugin-react-refresh')` |
| `terser-webpack-plugin` | Built-in `SwcJsMinimizerRspackPlugin` (no config needed) |
| `workbox-webpack-plugin` (`InjectManifest`) | Custom `InjectServiceWorkerManifestPlugin` in `webpack.pwa.js` |
| `dotenv-webpack` | Plain `require('dotenv').config()` |
`InjectServiceWorkerManifestPlugin` is a small inline plugin that
re-implements what `workbox-webpack-plugin`'s `InjectManifest` did, but
on top of Rspack's compilation hooks (`thisCompilation` →
`processAssets`, emitting a `RawSource`). It is defined locally in
`platform/app/.webpack/webpack.pwa.js` — copy it into your own
`webpack.pwa.js` derivative if you forked that file.
The React Refresh plugin is loaded defensively (`try/require`) and is
skipped when it is unavailable, in production, or during e2e coverage
runs (`COVERAGE=true`), since the refresh runtime's overlay iframe
interferes with Playwright/Cypress pointer events.
### Library output
Every package-level `webpack.prod.js` switched from the legacy library
flags to the structured `output.library` form:
```diff
output: {
- library: 'ohif-extension-cornerstone',
- libraryTarget: 'umd',
+ library: {
+ name: 'ohif-extension-cornerstone',
+ type: 'umd',
+ },
path: ROOT_DIR,
filename: pkg.main
}
```
If your extension uses the old flat `library` / `libraryTarget` keys,
move to the nested form — Rspack is stricter about validating this shape.
### Minifier
Terser is gone. Production builds use Rspack's built-in SWC minifier
unconditionally:
```diff
if (isProdBuild) {
- config.optimization.minimizer = [
- new TerserJSPlugin({ parallel: true, terserOptions: {} }),
- ];
+ config.optimization.minimizer = [new webpack.SwcJsMinimizerRspackPlugin()];
}
```
No options are needed for the common case. If you previously tuned
`terserOptions`, port the equivalent settings to the SWC minimizer's
options object.
### Source maps
The devtool setting is **unchanged** from 3.12 — production builds still
emit full `source-map`, development uses `cheap-module-source-map`, and a
`QUICK_BUILD=true` build disables source maps and minification entirely
(`config.devtool = false`):
```js
devtool: isProdBuild ? 'source-map' : 'cheap-module-source-map',
// …
if (isQuickBuild) {
config.optimization.minimize = false;
config.devtool = false;
}
```
### Caching
```diff
- cache: {
- type: 'filesystem',
- },
+ cache: isProdBuild ? false : { type: 'filesystem' },
```
Production builds always run from a clean cache. The development
filesystem cache is unchanged, but the cache directory is no longer
shared with Webpack — clear `.cache/` after upgrading if you see stale
output.
### `IgnorePlugin` for native modules
A new `IgnorePlugin` entry was added to skip Node-only modules pulled
in by the Cornerstone codecs:
```js
new webpack.IgnorePlugin({
resourceRegExp: /^(fs|path)$/,
contextRegExp: /@cornerstonejs[\\/]codec-/,
}),
```
If you removed this when forking `webpack.base.js`, add it back —
without it the prod bundle will try to require `fs` at runtime.
### Node globals (`__filename` / `__dirname`)
A new top-level `node` block tells the bundler to **leave `__filename` and
`__dirname` references un-substituted** rather than mocking them:
```js
node: {
__filename: false,
__dirname: false,
},
```
The Emscripten-compiled Cornerstone codecs reference `__dirname` inside
`if (ENVIRONMENT_IS_NODE)` branches that never run in the browser. Rspack's
default (a `'mock'` value) emits a warning for each such reference; setting
the values to `false` leaves them alone, which is harmless at runtime and
silences the warnings. The same `node` block is mirrored in
`rsbuild.config.ts` for the `dev:fast` path (Rsbuild's default is
`warn-mock`, with the same noisy behavior).
### Workspace package transpile
`.webpack/rules/transpileJavaScript.js` no longer treats `@ohif/*`
packages as opaque `node_modules`:
```diff
mode === 'production'
? excludeNodeModulesExcept([
+ // Workspace packages (needed for pnpm shamefully-hoist where they
+ // resolve through node_modules)
+ '@ohif',
'react-dnd',
'dnd-core',
```
pnpm symlinks workspace packages through `node_modules`, so the
transpile rule has to opt them back in or the production bundle would
ship un-transpiled TypeScript. Custom monorepos that vendor extensions
under a different scope should add their own scope here.
### Module resolution for pnpm
Two resolution changes were needed for pnpm's isolated (non-hoisted)
`node_modules` layout. Both live in `resolve` in `webpack.base.js` (and
`webpack.pwa.js`):
- `resolve.modules` now **leads with a bare `'node_modules'`** before the
absolute paths. This preserves the default importer-relative walk-up so
transitive deps (e.g. `react-remove-scroll``tslib`) resolve to the
sibling copy inside `.pnpm/<pkg>/node_modules` rather than an older
hoisted one.
```diff
modules: [
+ 'node_modules',
path.resolve(__dirname, '../node_modules'),
path.resolve(__dirname, '../../../node_modules'),
// …
],
```
- A new `'@ohif/app$'` alias maps the bare specifier to the app source.
A couple of extensions import app-level utilities from `@ohif/app`;
pnpm's isolated layout does not expose the top-level app package to
them, and adding it as a workspace dependency would create an
`app ↔ default` cycle, so the alias resolves it directly (the `$`
makes it an exact match, so deep subpath imports still resolve normally):
```js
'@ohif/app$': path.resolve(__dirname, '../platform/app/src/index.js'),
```
### Plugin resolution from source (`writePluginImportsFile.js`)
Under yarn the app depended on every extension/mode and copied their
`public/` and `dist/` assets out of `node_modules`. Under pnpm + Rspack,
extensions and modes are **not** dependencies of `platform/app`; instead
`writePluginImportsFile.js` resolves the source directory of each plugin
**declared in `pluginConfig.json`**. It scans the `extensions/` and `modes/`
workspaces only to map the *declared* package names to their directories —
packages present in those workspaces but not listed in `pluginConfig.json`
are ignored. The resulting map is exposed two ways:
- `getPluginResolveAliases()` returns a `resolve.alias` map (one exact-match
`"<pkg>$"` entry per plugin in `pluginConfig.json`) that `webpack.pwa.js`
merges into `resolve.alias`, so the generated `pluginImports.js`
`import()`s link to the plugin source without the plugin being a
dependency.
- `createCopyPluginToDist(...)` copies each plugin's `public/` and `dist/`
assets from that same source directory (falling back to `node_modules`
for third-party entries such as `dicom-microscopy-viewer`).
A plugin can be included three ways, all declared as an entry in
`pluginConfig.json`:
1. **In-tree workspace** — a package under `extensions/` or `modes/`. Declare
it by `packageName`; its source directory is found by the workspace scan.
2. **External, out-of-tree source** — a checkout that lives outside this repo
(e.g. an extension generated by the OHIF CLI). Add a `directory` field to
the entry. The path may be absolute, `~`-relative to the home directory, or
`.`-relative to the repo root; `workspacePluginDir()` uses it directly and
skips the workspace scan.
3. **Installed dependency** — add the package to the **root `package.json`** as
a normal dependency and declare it by `packageName` (no `directory`). It then
resolves from `node_modules` like any other installed package: the bare
specifier flows through webpack's normal module walk-up (no alias is
generated), and `pluginAssetDir()` copies its `public/`/`dist/` assets from
`node_modules`. This is the path used for third-party packages such as
`dicom-microscopy-viewer`.
If you maintain a fork that injects extensions a different way, this is the
seam to update.
## Per-package webpack.prod.js
For every workspace package that previously had a `webpack.prod.js`,
update the top of the file:
```diff
- const webpack = require('webpack');
+ const webpack = require('@rspack/core');
const { merge } = require('webpack-merge');
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
+ const MiniCssExtractPlugin = webpack.CssExtractRspackPlugin;
```
and replace the flat library options with the nested form shown above.
The rest of the file (`merge(...)`, `entry`, `externals`, `output.path`,
`output.filename`) is unchanged.
## Custom extensions
If you maintain an out-of-tree OHIF extension that uses the OHIF
template, do the following:
1. Add `@rspack/cli`, `@rspack/core`, `@rspack/dev-server`, and
`@rspack/plugin-react-refresh` to `devDependencies` (`^2.0.0`), and
remove `webpack`, `webpack-dev-server`, and the webpack-specific plugins
(`mini-css-extract-plugin`, `copy-webpack-plugin`, `html-webpack-plugin`,
`clean-webpack-plugin`, `terser-webpack-plugin`,
`@pmmmwh/react-refresh-webpack-plugin`, `workbox-webpack-plugin`,
`dotenv-webpack`).
2. Replace `require('webpack')` with `require('@rspack/core')` in your
`.webpack/*.js` files (you can keep the local variable named `webpack`).
3. Update plugin imports as shown in the table above, and switch the flat
`library`/`libraryTarget` keys to the nested `output.library` form.
4. Change your build script from `webpack` to `rspack build` (and
`webpack serve` to `rspack serve`).
5. If you re-export the OHIF base config, re-pull it after upgrading —
the `IgnorePlugin`, `node` block, `transpileJavaScript`, and pnpm
resolution changes only land when you re-merge.
## Known migration notes
- **`@million/lint`** integration is removed from `webpack.pwa.js`
(it was already commented out in 3.12).
- **`Dotenv` plugin** is replaced by a top-level `dotenv.config()`
call. If you relied on the plugin's `safe: true` behavior, move
that check into your config loader.
- **Dev server proxy** moved from the object-keyed shape to the
array-of-`{ context, target }` shape that `@rspack/dev-server`
expects:
```diff
- proxy: [{ '/dicomweb': 'http://localhost:5000' }],
+ proxy: [{ context: ['/dicomweb'], target: 'http://localhost:5000' }],
```
- **Dev-server overlay** is disabled when `COVERAGE=true` (the overlay
iframe intercepts pointer events and breaks Playwright/Cypress clicks);
it is kept on for normal local dev.
- The `dev:no:cache` script is now identical to `dev` — keep it as an
alias if external scripts call it, or delete it.
</content>
</invoke>

View File

@ -12,4 +12,17 @@ import { useCurrentSidebarCategory } from '@docusaurus/theme-common';
This guide covers changes when upgrading from OHIF version 3.12 to version 3.13.
The largest changes in 3.13 are infrastructure-level:
- **[Package Manager](./package-manager.md)** — the monorepo moves from
yarn + lerna to **pnpm workspaces**, with new install/run commands
and a `workspace:*` syntax for cross-package dependencies.
- **[Build Tooling](./build-tooling.md)** — Webpack is replaced with
**Rspack v2** across the app and every extension/mode, with new
plugin imports and faster build commands.
- **[Node Version](./node-version.md)** — the minimum Node.js runtime
is now **24**.
- **[SegmentationService](./segmentation-service.md)** — the
`removeSegmentationRepresentations` method was renamed.
<DocCardList items={useCurrentSidebarCategory().items.filter(item => item.docId !== 'migration-guide/3p12-to-3p13/index')} />

Some files were not shown because too many files have changed in this diff Show More