Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
fb29791
Add Vite build scripts and dependencies to package.json
dannon Nov 26, 2025
385caed
Add Vite configuration and shared build config
dannon Nov 26, 2025
40653f9
Add vite-plugin-webpack-aliases for legacy module resolution
dannon Nov 26, 2025
873740e
Add vite-plugin-build-metadata for Galaxy build info
dannon Nov 26, 2025
00a8127
Convert localization from AMD to ES modules
dannon Jul 11, 2025
318aa17
Add ESM-compatible jQuery wrapper for Vite
dannon Nov 26, 2025
821207e
Fix SCSS imports for Vite compatibility
dannon Nov 26, 2025
bbab567
Fix web worker path for Vite compatibility
dannon Nov 26, 2025
bd44718
Fix CSS comment syntax for Vite compatibility
dannon Nov 26, 2025
dbe20ed
Fix FormGeneric icon prop type for Vite compatibility
dannon Nov 26, 2025
bd9a9ef
Fix faGear import to use Font Awesome 6
dannon Nov 26, 2025
c997c0a
Add Vite dev server with proxy support
dannon Nov 26, 2025
3e8d0e6
Formatting for locale/imports
dannon Nov 26, 2025
509f1ab
Add libs entry point for window globals
dannon Nov 26, 2025
5fc7054
Switch build scripts to use Vite instead of webpack
dannon Nov 26, 2025
d61d68b
Remove webpack configuration and dependencies
dannon Nov 26, 2025
ebb8936
Clean up remaining webpack references
dannon Nov 26, 2025
efad7f7
Remove remaining webpack references and dead code
dannon Nov 26, 2025
3d561b8
Add @rollup/plugin-inject for jQuery/underscore globals
dannon Nov 27, 2025
c562b96
Use ES module script tags for Vite output
dannon Nov 27, 2025
96994e0
Refactor entry points for Vite compatibility
dannon Nov 28, 2025
e877ad5
Add Node.js polyfills for browser compatibility
dannon Nov 28, 2025
daadff4
Update Vite config for production builds
dannon Nov 28, 2025
10c73be
Update documentation and code for Vite migration
dannon Nov 28, 2025
e813dff
Add sourcemap support to Vite production builds
dannon Nov 28, 2025
3744cb6
Fix SCSS deprecation warning noise in Vite build
dannon Nov 29, 2025
d7f3610
Remove Babel dependencies
dannon Nov 29, 2025
ed305da
Update caniuse-lite database
dannon Nov 29, 2025
389c29b
Fix resizable.png path in WorkflowMinimap
dannon Nov 29, 2025
39dd0b1
Keep app/* in same chunk to fix circular dependency warnings
dannon Nov 29, 2025
7e762d7
Remove requirejs dependency
dannon Nov 29, 2025
8d7039a
Remove now-unused polyfills.js file
dannon Nov 30, 2025
7da7300
Remove unused bbi/ BigWig reader library
dannon Nov 30, 2025
696ea26
Remove unused farbtastic color picker plugin
dannon Nov 30, 2025
6e4b32a
Remove unused jquery.sparklines plugin
dannon Nov 30, 2025
b5c6945
Remove core-js and regenerator-runtime polyfills
dannon Nov 30, 2025
751dfaf
Remove stageLibs gulp task
dannon Nov 30, 2025
01bc96c
Add Vite dev server plugin for HMR support
dannon Nov 29, 2025
223e44f
Wire up dev server plugin and fix dev mode compatibility
dannon Nov 29, 2025
75e3d0c
Process queued config.set() calls in analysis entry point
dannon Nov 29, 2025
db46ff0
Support gzip-compressed responses and non-module script tags in dev s…
dannon Nov 29, 2025
a64f960
Split vendor chunks for better caching
dannon Nov 30, 2025
038e296
Fix staging to include subdirectories
dannon Nov 30, 2025
d11ecb4
Adjust vendor chunk splitting for bootstrap-vue compatibility
dannon Nov 30, 2025
9d6eeca
Minor final vitest upgrades
dannon Nov 30, 2025
ae01ebe
Bump CI node heap size for vite build
dannon Nov 30, 2025
0e56168
Add space after hid in history items
dannon Nov 30, 2025
08cdbe0
Fix Monaco editor integration for Vite
dannon Dec 1, 2025
a154ba7
Fix vue-tsc errors for Monaco worker imports
dannon Dec 1, 2025
bf2ae5c
Fix workflow editor auto-layout breaking in Vite production builds
dannon Dec 2, 2025
c6e82cf
Add explicit space between tool name and description in toolbox
dannon Dec 2, 2025
842bf5e
Fix custom tools selenium test using stable Monaco editor selector
dannon Dec 2, 2025
c831f6a
Remove unused config.set queue processing code
dannon Dec 2, 2025
57a3aa6
Use `whitespace: "preserve"` compiler option
mvdbeek Dec 3, 2025
6b9494e
Revert "Use `whitespace: "preserve"` compiler option"
mvdbeek Dec 3, 2025
27849cd
Bump --max-old-space-size to 4G in Makefile
mvdbeek Dec 3, 2025
03fb5f8
Merge remote-tracking branch 'upstream/dev' into vite-reorganized
dannon Dec 3, 2025
fbbfda1
Remove bundleEntries and window.config exports
dannon Dec 3, 2025
28872f1
Use whitespace: preserve to match Webpack vue-loader behavior
dannon Dec 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
env:
GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR: 1
NODE_OPTIONS: --max-old-space-size=4096
run: make client
working-directory: 'galaxy root'
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ YARN_INSTALL_OPTS=--network-timeout 300000 --check-files
GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR?=0
# Respect predefined NODE_OPTIONS, otherwise set maximum heap size low for
# compatibility with smaller machines.
NODE_OPTIONS ?= --max-old-space-size=3072
NODE_OPTIONS ?= --max-old-space-size=4096
NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS) GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR=$(GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR)
CWL_TARGETS := test/functional/tools/cwl_tools/v1.0/conformance_tests.yaml \
test/functional/tools/cwl_tools/v1.1/conformance_tests.yaml \
Expand Down Expand Up @@ -235,7 +235,7 @@ client-lint-autofix: client-node-deps ## Automatically fix linting errors in cli
client-format: client-node-deps client-lint-autofix ## Reformat client code, ensures autofixes are applied first
$(IN_VENV) cd client && yarn run format

client-dev-server: client-node-deps ## Starts a webpack dev server for client development (HMR enabled)
client-dev-server: client-node-deps ## Starts a Vite dev server for client development (HMR enabled)
$(IN_VENV) cd client && $(NODE_ENV) yarn run develop

client-test: client-node-deps ## Run JS unit tests
Expand Down
10 changes: 5 additions & 5 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Or, with the package scripts from this `client` directory:

yarn run develop

This will start up an extra client development server running on port 8081. Open
your browser to `http://localhost:8081` (instead of the default 8080 that Galaxy
This will start up an extra client development server running on port 5173. Open
your browser to `http://localhost:5173` (instead of the default 8080 that Galaxy
would run on), and you should see Galaxy like normal. Except now, when you
change client code it'll automatically rebuild _and_ reload the relevant portion
of the application for you. Lastly, if you are running Galaxy at a location
Expand All @@ -76,7 +76,7 @@ also possible if you set the `CHANGE_ORIGIN` environment variable:

You can also specify a particular port to bind the dev server to:

WEBPACK_PORT=8083 yarn run develop
VITE_PORT=8083 yarn run develop

## Running a Separate Server

Expand All @@ -101,8 +101,8 @@ apply site-wide.

On build, the compiled css bundle is served at `/static/dist/base.css`.

As mentioned above, `make client` will rebuild styles as a part of the webpack
build. For iterative development, "Watch Mode" rebuilds as described above do
As mentioned above, `make client` will rebuild styles as a part of the build
process. For iterative development, "Watch Mode" rebuilds as described above do
include style changes.

## Client-Side Unit Testing
Expand Down
8 changes: 0 additions & 8 deletions client/babel.config.json

This file was deleted.

59 changes: 59 additions & 0 deletions client/build-config.shared.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* Build configuration for Vite
* Single source of truth for legacy module resolution
*/
import path from "path";
import { fileURLToPath } from "url";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const scriptsBase = path.join(__dirname, "src");
const libsBase = path.join(scriptsBase, "libs");
const styleBase = path.join(scriptsBase, "style");

// Legacy exact-match aliases
export const legacyAliases = {
// Core libraries
// Note: jquery is NOT aliased - it resolves to node_modules/jquery directly
// The global setup (window.$, window.jQuery) is done in libs.js
jqueryVendor: path.join(libsBase, "jquery/jquery.js"),
storemodern: path.join(__dirname, "node_modules/store/dist/store.modern.js"),

// Vue
vue: path.join(__dirname, "node_modules/vue/dist/vue.esm.js"),

// Build config
config: path.join(scriptsBase, "config", process.env.NODE_ENV || "development") + ".js",
app: path.join(scriptsBase, "app.js"),
};

// Module resolution paths
export const modulePaths = [scriptsBase, "node_modules", styleBase];

// File extensions for resolution
export const extensions = [".ts", ".js", ".json", ".vue", ".scss"];

/**
* Get Vite-format aliases (uses regex patterns for exact matches)
*/
export function getViteAliases() {
const viteAliases = [
// @ alias
{ find: "@", replacement: scriptsBase },
];

// Add exact match patterns
for (const [key, value] of Object.entries(legacyAliases)) {
viteAliases.push({
find: new RegExp(`^${key}$`),
replacement: path.isAbsolute(value) ? value : path.join(__dirname, value),
});
}

// Add prefix patterns for legacy paths
viteAliases.push(
{ find: /^libs\//, replacement: libsBase + "/" },
{ find: /^ui\//, replacement: path.join(scriptsBase, "ui") + "/" },
);

return viteAliases;
}
34 changes: 2 additions & 32 deletions client/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@ const buildIcons = require("./icons/build_icons");
const os = require("os");
const yaml = require("yaml");

const PATHS = {
nodeModules: "./node_modules",
stagedLibraries: {
backbone: ["backbone.js", "backbone.js"],
jquery: ["dist/jquery.js", "jquery/jquery.js"],
"jquery-migrate": ["dist/jquery-migrate.js", "jquery/jquery.migrate.js"],
"jquery-mousewheel": ["jquery.mousewheel.js", "jquery/jquery.mousewheel.js"],
requirejs: ["require.js", "require.js"],
underscore: ["underscore.js", "underscore.js"],
},
};
const PATHS = {};

// Check if visualization steps should be skipped
const SKIP_VIZ = process.env.SKIP_VIZ === "true" || process.env.SKIP_VIZ === "1";
Expand All @@ -44,26 +34,6 @@ try {
VISUALIZATION_PLUGINS = {};
}

function stageLibs(callback) {
try {
Object.keys(PATHS.stagedLibraries).forEach((lib) => {
const p1 = path.resolve(path.join(PATHS.nodeModules, lib, PATHS.stagedLibraries[lib][0]));
const p2 = path.resolve(path.join("src", "libs", PATHS.stagedLibraries[lib][1]));
if (fs.existsSync(p1)) {
fs.removeSync(p2);
fs.createReadStream(p1).pipe(fs.createWriteStream(p2));
} else {
throw new Error(
`${p1} does not exist, yet it is a required library. Check that the package in question exists in node_modules.`,
);
}
});
callback();
} catch (err) {
callback(err);
}
}

async function icons() {
await buildIcons("./src/assets/icons.json");
const generateIconsTypeScript = require("./icons/generate_ts_icons");
Expand Down Expand Up @@ -208,7 +178,7 @@ function forceInstallVisualizations(callback) {
return installVisualizations(callback, true);
}

const client = parallel(stageLibs, icons);
const client = icons;
const plugins = series(installVisualizations, cleanPlugins, stagePlugins);
const pluginsRebuild = series(forceInstallVisualizations, cleanPlugins, stagePlugins);

Expand Down
64 changes: 14 additions & 50 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
],
"resolutions": {
"chokidar": "3.5.3",
"vue": "2.7.16",
"vue-loader": "15.11.1"
"vue": "2.7.16"
},
"dependencies": {
"@citation-js/core": "^0.7.1",
Expand Down Expand Up @@ -51,11 +50,9 @@
"ag-grid-vue": "^30",
"assert": "^2.1.0",
"axios": "^1.6.2",
"babel-runtime": "^6.26.0",
"backbone": "1.5.0",
"bootstrap": "4.6",
"bootstrap-vue": "^2.23.0",
"core-js": "^3.33.1",
"csv-parse": "^5.5.2",
"d3": "^7.8.5",
"d3-zoom": "^3.0.0",
Expand All @@ -65,9 +62,9 @@
"dexie": "^3.2.5",
"dom-to-image": "^2.6.0",
"dompurify": "^3.0.6",
"dumpmeta-webpack-plugin": "^0.2.0",
"echarts": "^5.5.1",
"elkjs": "^0.8.2",
"events": "^3.3.0",
"file-saver": "^2.0.5",
"flush-promises": "^1.0.2",
"font-awesome-6": "npm:@fortawesome/free-solid-svg-icons@6",
Expand All @@ -88,7 +85,6 @@
"markdown-it": "^13.0.2",
"markdown-it-regexp": "^0.4.0",
"monaco-editor": "^0.52.2",
"monaco-editor-webpack-plugin": "^7.1.0",
"monaco-yaml": "^5.4.0",
"object-hash": "^3.0.0",
"openapi-fetch": "^0.10.6",
Expand All @@ -97,8 +93,6 @@
"pretty-bytes": "^6.1.1",
"pyre-to-regexp": "^0.0.6",
"querystring-es3": "^0.2.1",
"regenerator-runtime": "^0.14.0",
"requirejs": "2.3.7",
"ro-crate-zip-explorer": "^0.4.1",
"rxjs": "^7.8.1",
"rxjs-spy": "^8.0.2",
Expand Down Expand Up @@ -133,16 +127,12 @@
"yaml": "^2.6.1"
},
"scripts": {
"develop": "NODE_ENV=development gulp && webpack-dev-server",
"build": "NODE_ENV=development gulp && webpack && yarn run stage-build",
"build-production": "NODE_ENV=production gulp && yarn run webpack-production && yarn run stage-build",
"build-production-maps": "NODE_ENV=production gulp && yarn run webpack-production-maps && yarn run stage-build",
"build-stats": "NODE_ENV=production webpack --profile --json=webpack-stats.json",
"view-stats": "webpack-bundle-analyzer webpack-stats.json ../static/dist/",
"webpack-production": "NODE_ENV=production webpack",
"webpack-production-maps": "GXY_BUILD_SOURCEMAPS=1 NODE_ENV=production webpack",
"develop": "NODE_ENV=development vite",
"build": "NODE_ENV=development gulp && vite build && yarn run stage-build",
"build-production": "NODE_ENV=production gulp && vite build && yarn run stage-build",
"build-production-maps": "GXY_BUILD_SOURCEMAPS=1 NODE_ENV=production gulp && vite build && yarn run stage-build",
"gulp": "gulp",
"stage-build": "cpy 'dist/*' '../static/dist' && (git rev-parse HEAD 2>/dev/null || echo '') >../static/client_build_hash.txt",
"stage-build": "cpy 'dist/**/*' '../static/dist' && (git rev-parse HEAD 2>/dev/null || echo '') >../static/client_build_hash.txt",
"format": "prettier --write . --cache",
"format-check": "prettier --check .",
"prettier": "yarn run format",
Expand All @@ -155,12 +145,9 @@
"type-check": "vue-tsc --noEmit"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/helper-validator-identifier": "^7.22.20",
"@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@modyfi/vite-plugin-yaml": "^1.1.1",
"@pinia/testing": "0.1.3",
"@rollup/plugin-inject": "^5.0.5",
"@testing-library/jest-dom": "^6.4.8",
"@types/d3": "^7.4.2",
"@types/dompurify": "^3.0.2",
Expand All @@ -172,63 +159,40 @@
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@vitejs/plugin-vue2": "^2.3.4",
"@vitest/coverage-v8": "^4.0.13",
"@vitest/ui": "^4.0.13",
"@vitest/coverage-v8": "^4.0.14",
"@vitest/ui": "^4.0.14",
"@vue/test-utils": "^1.3.6",
"@vue/tsconfig": "^0.4.0",
"amdi18n-loader": "^0.9.4",
"autoprefixer": "10.4.16",
"axios-mock-adapter": "^1.22.0",
"babel-plugin-transform-import-meta": "^2.2.1",
"buffer": "^6.0.3",
"circular-dependency-plugin": "^5.2.2",
"cpy-cli": "^5.0.0",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^5.0.1",
"eslint": "^8.52.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vue": "^9.17.0",
"eslint-plugin-vuejs-accessibility": "^2.2.0",
"expose-loader": "^5.0.1",
"fake-indexeddb": "^6.0.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"fs-extra": "^11.2.0",
"gulp": "^5.0.0",
"happy-dom": "^20.0.10",
"ignore-loader": "^0.1.2",
"imports-loader": "^5.0.0",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "^2.9.2",
"msw": "^2.3.4",
"openapi-msw": "^0.7.0",
"openapi-typescript": "^7.3.0",
"postcss-loader": "^7.3.3",
"prettier": "^3.6.2",
"process": "^0.11.10",
"raw-loader": "^4.0.2",
"sass": "^1.94.2",
"sass-loader": "^16.0.5",
"store": "^2.0.12",
"thread-loader": "^4.0.4",
"ts-loader": "^9.5.2",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.7.3",
"vite": "^7.2.4",
"vitest": "^4.0.13",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^4.0.14",
"vitest-fail-on-console": "^0.10.1",
"vitest-location-mock": "^1.0.4",
"vue-loader": "^15.11.1",
"vue-template-compiler": "^2.7.16",
"vue-tsc": "2.2.12",
"webpack": "^5.98.0",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.0",
"webpack-merge": "^6.0.1",
"xml-js": "^1.6.11",
"xml2js": "^0.6.2",
"yaml-loader": "^0.8.1"
"xml2js": "^0.6.2"
},
"peerDependencies": {
"postcss": "^8.4.6"
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/AboutGalaxy.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
/* global __buildTimestamp__, __license__ */
/* (injected by webpack) */
/* (injected at build time) */

import { computed } from "vue";
import { RouterLink } from "vue-router";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Citation/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function getCitations(source: string, id: string): Promise<Citation
const request = await axios.get(`${getAppRoot()}api/${source}/${id}/citations`);
const rawCitations = request.data;
const citations = [];
const { Cite } = await import(/* webpackChunkName: "cite" */ "./cite");
const { Cite } = await import("./cite");
for (const rawCitation of rawCitations) {
try {
const cite = new Cite(rawCitation.content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ function selectionAsHdaSummary(value: any): HDASummary {
</template>

<style scoped lang="scss">
@import "base.scss";
@import "@/style/scss/base.scss";
@import "@/style/scss/theme/blue.scss";

.list-collection-creator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ async function ruleBasedCollectionCreatorModal(elements, elementsType, importTyp
};
});

const module = await import(
/* webpackChunkName: "ruleCollectionBuilder" */ "@/components/RuleCollectionBuilder.vue"
);
const module = await import("@/components/RuleCollectionBuilder.vue");
const ruleCollectionBuilderInstance = Vue.extend(module.default);
const vm = document.createElement("div");

Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Collections/sheet/SampleSheetGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,8 @@ defineExpose({ attemptCreate });
</style>

<style>
// doesn't work with scoped style, newer AG Grid lets specifying style directly
// in ColDef but this deson't seem work with this older AG Grid we're using Vue 2.
/* doesn't work with scoped style, newer AG Grid lets specifying style directly
in ColDef but this doesn't seem work with this older AG Grid we're using Vue 2. */
.ag-grid-column-has-custom-header-description {
text-decoration-line: underline;
text-decoration-style: dashed;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/GCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ function onKeyDown(event: KeyboardEvent) {

<style scoped lang="scss">
@import "@/style/scss/theme/blue.scss";
@import "_breakpoints.scss";
@import "@/style/scss/_breakpoints.scss";

.g-card {
container: g-card / inline-size;
Expand Down
Loading
Loading