Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support rspack modern ssr #2775

Merged
merged 123 commits into from
Jul 26, 2024
Merged

feat: support rspack modern ssr #2775

merged 123 commits into from
Jul 26, 2024

Conversation

2heal1
Copy link
Member

@2heal1 2heal1 commented Jul 22, 2024

Description

support rspack ssr

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@2heal1 2heal1 changed the title WIP: feat: support rspack modern ssr feat: support rspack modern ssr Jul 25, 2024
@RussellCanfield
Copy link
Contributor

@squadronai review

Copy link
Contributor

@squadronai squadronai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This pull request adds support for Rspack modern SSR (Server-Side Rendering) to the project. The key changes include:

  1. Modifications to the TypeScript configuration object in the dts-plugin package to extract and remove paths and baseUrl from the compiler options, construct a list of files to compile (including exposed components, .d.ts files, and additional files), and update the configuration's include, files, and exclude properties.

  2. Addition of a hook to the compilation process in the enhanced package's ConsumeSharedPlugin.ts file. This hook sets up a dependency factory for ConsumeSharedFallbackDependency and uses the thisCompilation hook to access the compilation and normalModuleFactory objects.

These changes aim to integrate the Rspack modern SSR functionality into the existing codebase, providing support for this new feature.

File Summaries
File Summary
packages/dts-plugin/src/core/configurations/remotePlugin.ts The code modifies a TypeScript configuration object by extracting and removing 'paths' and 'baseUrl' from compiler options. It then constructs a list of files to compile, including exposed components, .d.ts files, and additional files. Finally, it updates the configuration's include, files, and exclude properties.
packages/enhanced/src/lib/sharing/ConsumeSharedPlugin.ts The code adds a hook to the compilation process, setting up a dependency factory for ConsumeSharedFallbackDependency. It uses the thisCompilation hook to access the compilation and normalModuleFactory objects.

Commits reviewed:

0de1c8365c73245995c5d5b5e68cbda00046b6de...435070a23b2edd948cdf953d05440acce8f7f845
435070a23b2edd948cdf953d05440acce8f7f845...66c1d3773d35ad01fb4bba1150f2ed1a4c4bf40c
66c1d3773d35ad01fb4bba1150f2ed1a4c4bf40c...af44dfe20bbe3098420b3e67720cc4b1f8ff246d
af44dfe20bbe3098420b3e67720cc4b1f8ff246d...bce12593136aadc52d16ef2695c53c6b01908693
af44dfe20bbe3098420b3e67720cc4b1f8ff246d...bce12593136aadc52d16ef2695c53c6b01908693
af44dfe20bbe3098420b3e67720cc4b1f8ff246d...bce12593136aadc52d16ef2695c53c6b01908693

@zhoushaw zhoushaw merged commit 85ae159 into main Jul 26, 2024
15 checks passed
@zhoushaw zhoushaw deleted the feat/rspack-modern-ssr branch July 26, 2024 09:10
@2heal1 2heal1 mentioned this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants