Skip to content

767 improve vite plugin build strategy#770

Merged
basmasking merged 42 commits intomainfrom
767-improve-vite-plugin-build-strategy
May 8, 2026
Merged

767 improve vite plugin build strategy#770
basmasking merged 42 commits intomainfrom
767-improve-vite-plugin-build-strategy

Conversation

@petermasking
Copy link
Copy Markdown
Member

Fixes #767

Changes proposed in this pull request:

  • Refactored Vite plugin to offload the heavy lifting to the build package
  • Refactored analysis model and parser to enable regenerating code from the model
  • Refactored build package to generate modules through the analysis model to avoid fragile/risky regex based import/export rewrites and complex code generation
  • Reconfigured TypeScript to a more modern and shared setup

@MaskingTechnology/jitar

* config filename
* root location (of the config file)
Refactored the file helper to support this
Reads an application into a model and generates code for modules
This improved version uses the build package for generating segment-aware module code.
@petermasking petermasking requested a review from basmasking as a code owner May 8, 2026 15:13
@petermasking petermasking linked an issue May 8, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Important

Review skipped

Too many files!

This PR contains 166 files, which is 16 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9f695717-081a-49ac-8106-d8258e68c912

📥 Commits

Reviewing files that changed from the base of the PR and between f8233e3 and 9a50dcb.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (166)
  • documentation/docs/develop/writing-functions.md
  • documentation/docs/fundamentals/building-blocks.md
  • documentation/docs/integrate/vite-plugin.md
  • examples/access-protection/tsconfig.json
  • examples/data-transportation/tsconfig.json
  • examples/error-handling/tsconfig.json
  • examples/health-checks/tsconfig.json
  • examples/hello-world/tsconfig.json
  • examples/load-balancing/tsconfig.json
  • examples/middleware/tsconfig.json
  • examples/multi-version/tsconfig.json
  • examples/resources/tsconfig.json
  • examples/segmentation/tsconfig.json
  • package.json
  • packages/analysis/README.md
  • packages/analysis/src/dynamic/ClassMerger.ts
  • packages/analysis/src/dynamic/Reflector.ts
  • packages/analysis/src/index.ts
  • packages/analysis/src/model/ESArrayBinding.ts
  • packages/analysis/src/model/ESArrowFunction.ts
  • packages/analysis/src/model/ESBinding.ts
  • packages/analysis/src/model/ESBindingElement.ts
  • packages/analysis/src/model/ESBlock.ts
  • packages/analysis/src/model/ESClass.ts
  • packages/analysis/src/model/ESClassMember.ts
  • packages/analysis/src/model/ESConstructor.ts
  • packages/analysis/src/model/ESDeclaration.ts
  • packages/analysis/src/model/ESExport.ts
  • packages/analysis/src/model/ESExpression.ts
  • packages/analysis/src/model/ESField.ts
  • packages/analysis/src/model/ESFunction.ts
  • packages/analysis/src/model/ESGeneratorFunction.ts
  • packages/analysis/src/model/ESGeneratorMethod.ts
  • packages/analysis/src/model/ESGetter.ts
  • packages/analysis/src/model/ESIdentifierBinding.ts
  • packages/analysis/src/model/ESImport.ts
  • packages/analysis/src/model/ESMethod.ts
  • packages/analysis/src/model/ESModule.ts
  • packages/analysis/src/model/ESModuleMember.ts
  • packages/analysis/src/model/ESObjectBinding.ts
  • packages/analysis/src/model/ESParameter.ts
  • packages/analysis/src/model/ESSetter.ts
  • packages/analysis/src/model/ESStatement.ts
  • packages/analysis/src/model/ESVariable.ts
  • packages/analysis/src/model/index.ts
  • packages/analysis/src/models/ESAlias.ts
  • packages/analysis/src/models/ESArray.ts
  • packages/analysis/src/models/ESClass.ts
  • packages/analysis/src/models/ESDeclaration.ts
  • packages/analysis/src/models/ESDestructuredArray.ts
  • packages/analysis/src/models/ESDestructuredObject.ts
  • packages/analysis/src/models/ESDestructuredValue.ts
  • packages/analysis/src/models/ESExport.ts
  • packages/analysis/src/models/ESExpression.ts
  • packages/analysis/src/models/ESField.ts
  • packages/analysis/src/models/ESFunction.ts
  • packages/analysis/src/models/ESGenerator.ts
  • packages/analysis/src/models/ESGetter.ts
  • packages/analysis/src/models/ESIdentifier.ts
  • packages/analysis/src/models/ESImport.ts
  • packages/analysis/src/models/ESMember.ts
  • packages/analysis/src/models/ESModule.ts
  • packages/analysis/src/models/ESObject.ts
  • packages/analysis/src/models/ESParameter.ts
  • packages/analysis/src/models/ESScope.ts
  • packages/analysis/src/models/ESSetter.ts
  • packages/analysis/src/models/ESValue.ts
  • packages/analysis/src/models/index.ts
  • packages/analysis/src/static/Coder.ts
  • packages/analysis/src/static/Lexer.ts
  • packages/analysis/src/static/Parser.ts
  • packages/analysis/src/static/definitions/Boolean.ts
  • packages/analysis/src/static/definitions/Empty.ts
  • packages/analysis/src/static/definitions/Indicator.ts
  • packages/analysis/src/static/definitions/Keyword.ts
  • packages/analysis/src/static/definitions/Number.ts
  • packages/analysis/src/static/definitions/Operator.ts
  • packages/analysis/src/static/definitions/Punctuation.ts
  • packages/analysis/src/static/definitions/TokenType.ts
  • packages/analysis/src/static/index.ts
  • packages/analysis/src/static/models/ItemList.ts
  • packages/analysis/test/dynamic/Reflector.spec.ts
  • packages/analysis/test/model/ESClass.spec.ts
  • packages/analysis/test/model/ESModule.spec.ts
  • packages/analysis/test/model/fixtures/esClass.fixture.ts
  • packages/analysis/test/model/fixtures/esModule.fixture.ts
  • packages/analysis/test/model/fixtures/index.ts
  • packages/analysis/test/models/ESClass.spec.ts
  • packages/analysis/test/models/ESModule.spec.ts
  • packages/analysis/test/models/ESScope.spec.ts
  • packages/analysis/test/models/fixtures/esClass.fixture.ts
  • packages/analysis/test/models/fixtures/esModule.fixture.ts
  • packages/analysis/test/models/fixtures/esScope.fixture.ts
  • packages/analysis/test/static/Lexer.spec.ts
  • packages/analysis/test/static/Parser.spec.ts
  • packages/analysis/test/static/fixtures/classes.fixture.ts
  • packages/analysis/test/static/fixtures/code.fixture.ts
  • packages/analysis/test/static/fixtures/exports.fixture.ts
  • packages/analysis/test/static/fixtures/modules.fixture.ts
  • packages/analysis/tsconfig.json
  • packages/build/src/BuildHelper.ts
  • packages/build/src/BuildManager.ts
  • packages/build/src/definitions/Patterns.ts
  • packages/build/src/definitions/index.ts
  • packages/build/src/errors/ApplicationModuleNotFound.ts
  • packages/build/src/errors/ApplicationNotRead.ts
  • packages/build/src/index.ts
  • packages/build/src/source/module/LocationRewriter.ts
  • packages/build/src/source/module/Reader.ts
  • packages/build/src/source/module/models/Module.ts
  • packages/build/src/source/segment/MemberLocator.ts
  • packages/build/src/source/segment/Reader.ts
  • packages/build/src/target/index.ts
  • packages/build/src/target/module/Builder.ts
  • packages/build/src/target/module/ExportRewriter.ts
  • packages/build/src/target/module/ImportRewriter.ts
  • packages/build/src/target/module/LocalBuilder.ts
  • packages/build/src/target/module/LocalGenerator.ts
  • packages/build/src/target/module/LocationRewriter.ts
  • packages/build/src/target/module/RemoteBuilder.ts
  • packages/build/src/target/module/RemoteGenerator.ts
  • packages/build/src/target/module/errors/RewriteItemNotFound.ts
  • packages/build/src/target/segment/Builder.ts
  • packages/build/src/target/segment/Generator.ts
  • packages/build/src/utils/FileHelper.ts
  • packages/build/tsconfig.json
  • packages/cli/tsconfig.json
  • packages/configuration/src/ConfigurationManager.ts
  • packages/configuration/src/environment/Configurator.ts
  • packages/configuration/src/runtime/ConfigurationBuilder.ts
  • packages/configuration/src/runtime/definitions/RuntimeConfiguration.ts
  • packages/configuration/src/server/ConfigurationBuilder.ts
  • packages/configuration/src/server/definitions/ServerConfiguration.ts
  • packages/configuration/src/utils/ConfigurationReader.ts
  • packages/configuration/test/fixtures/fileManager.fixture.ts
  • packages/configuration/test/runtime/ConfigurationBuilder.spec.ts
  • packages/configuration/test/runtime/fixtures/configuration.fixture.ts
  • packages/configuration/test/runtime/fixtures/files.fixture.ts
  • packages/configuration/test/server/ConfigurationBuilder.spec.ts
  • packages/configuration/test/server/fixtures/configuration.fixture.ts
  • packages/configuration/test/server/fixtures/files.fixture.ts
  • packages/configuration/test/server/fixtures/index.ts
  • packages/configuration/tsconfig.json
  • packages/create-jitar/tsconfig.json
  • packages/errors/tsconfig.json
  • packages/execution/tsconfig.json
  • packages/health/tsconfig.json
  • packages/http/tsconfig.json
  • packages/init/tsconfig.json
  • packages/jitar/src/lib.ts
  • packages/jitar/tsconfig.json
  • packages/logging/tsconfig.json
  • packages/middleware/tsconfig.json
  • packages/plugin-vite/package.json
  • packages/plugin-vite/src/index.ts
  • packages/plugin-vite/tsconfig.json
  • packages/runtime/tsconfig.json
  • packages/scheduling/tsconfig.json
  • packages/serialization/src/serializers/ClassSerializer.ts
  • packages/serialization/tsconfig.json
  • packages/services/tsconfig.json
  • packages/sourcing/src/files/index.ts
  • packages/sourcing/src/index.ts
  • packages/sourcing/tsconfig.json
  • packages/validation/tsconfig.json
  • tsconfig.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
4.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@basmasking basmasking merged commit 1de18a1 into main May 8, 2026
24 of 25 checks passed
@basmasking basmasking deleted the 767-improve-vite-plugin-build-strategy branch May 8, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Vite plugin build strategy

2 participants