LearnNewsExamplesServices
Frontmatter
id9290
titleRefactor DevIndex data deployment strategy to prevent huge resource duplication
stateClosed
labels
enhancementaibuild
assigneestobiu
createdAtFeb 24, 2026, 4:54 PM
updatedAtFeb 24, 2026, 4:57 PM
githubUrlhttps://github.com/neomjs/neo/issues/9290
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 24, 2026, 4:57 PM

Refactor DevIndex data deployment strategy to prevent huge resource duplication

Closed v12.0.0 enhancementaibuild
tobiu
tobiu commented on Feb 24, 2026, 4:54 PM

Problem

The apps/devindex/resources folder contains heavy data files, notably the users.jsonl file which is currently 22MB. When building the project for dist/development and dist/production environments, the build scripts (buildScripts/webpack/... and buildScripts/build/esmodules.mjs) blindly copy everything in the resources directory.

This leads to significant, unnecessary duplication of heavy data files in the deployment artifacts. Furthermore, the backend data factory needs a single source of truth (the dev branch data) to act upon.

Solution

  1. Move the data files (*.json, *.jsonl) within apps/devindex/resources into a dedicated data/ subdirectory (apps/devindex/resources/data).
  2. Update the backend data factory config (apps/devindex/services/config.mjs) to point to the new data/ paths.
  3. Update the Contributors.mjs store proxy URL to fetch data from Neo.config.basePath + 'apps/devindex/resources/data/users.jsonl'. This ensures that dist environments correctly resolve the path back to the original source folder, enabling them to pull data from the dev environment as the single source of truth.
  4. Modify the resource copying logic in the build scripts (webpack.config.appworker.mjs for dev and prod, and esmodules.mjs) to explicitly remove the data directory from apps/devindex/resources after the initial copy, preventing the heavy files from being deployed to dist/.
tobiu added the enhancement label on Feb 24, 2026, 4:54 PM
tobiu added the ai label on Feb 24, 2026, 4:54 PM
tobiu added the build label on Feb 24, 2026, 4:54 PM
tobiu referenced in commit 04a30f4 - "build: Refactor DevIndex data deployment strategy (#9290)" on Feb 24, 2026, 4:55 PM
tobiu assigned to @tobiu on Feb 24, 2026, 4:56 PM
tobiu
tobiu Feb 24, 2026, 4:56 PM

Input from Gemini 3.1 Pro:

✦ I have successfully moved the *.json and *.jsonl files from apps/devindex/resources to apps/devindex/resources/data. The config.mjs has been updated to point to the new paths, and the Contributors.mjs store now fetches the users.jsonl data correctly using Neo.config.basePath.

I have also updated the build scripts (buildScripts/webpack/production/webpack.config.appworker.mjs, buildScripts/webpack/development/webpack.config.appworker.mjs, and buildScripts/build/esmodules.mjs) with an explicit exception for the DevIndex app. The scripts now remove the data directory from the copied resources folder, preventing the 22MB users.jsonl and other data files from being duplicated in the dist builds.

The changes have been pushed to the dev branch.

tobiu closed this issue on Feb 24, 2026, 4:57 PM