Merge branch 'release-3.4.1' into fix/rspack-plugin-cache-tracking

This commit is contained in:
Nacho Codoñer
2026-03-30 12:26:55 +02:00
committed by GitHub
4 changed files with 117 additions and 2 deletions

95
.coderabbit.yaml Normal file
View File

@@ -0,0 +1,95 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
reviews:
profile: "chill" # community repo — keep it welcoming
request_changes_workflow: false
high_level_summary: true
poem: false # serious OSS platform
in_progress_fortune: false # noise
review_status: false
review_details: false
commit_status: true
collapse_walkthrough: true
changed_files_summary: true
sequence_diagrams: false # overkill for package-level PRs
estimate_code_review_effort: true
assess_linked_issues: true
related_issues: true
related_prs: true
suggested_labels: true
auto_apply_labels: false
suggested_reviewers: true
auto_assign_reviewers: false
# Exclude generated, build, and Meteor-internal files
path_filters:
- "!**/node_modules/**"
- "!**/.meteor/**"
- "!**/bundle/**"
- "!**/programs/**"
- "!**/*.min.js"
- "!**/cordova-build/**"
- "!**/package-lock.json"
path_instructions:
- path: "packages/**"
instructions: >
This is a core Meteor Atmosphere package. Focus on API backwards
compatibility, DDP/reactivity correctness, and client/server split.
Avoid nitpicking style — the codebase has legacy patterns.
- path: "tools/**"
instructions: >
This is the Meteor build tool (Isobuild). Be thorough about
correctness, edge cases, and performance in the CLI/build pipeline.
- path: "npm-packages/**"
instructions: >
These are npm packages published from the Meteor monorepo.
Check for correct exports, peer dependency handling, and Node.js compatibility.
- path: "v3-docs/**"
instructions: >
Documentation for Meteor v3. Check for accuracy, clarity, and
correct code examples. Grammar and spelling matter here.
- path: "scripts/**"
instructions: >
Build and CI scripts. Focus on correctness, portability, and
error handling.
auto_review:
enabled: true
drafts: false
auto_incremental_review: true
auto_pause_after_reviewed_commits: 3
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
base_branches: []
finishing_touches:
docstrings:
enabled: false # legacy JS — too much noise across 100s of packages
unit_tests:
enabled: true
simplify:
enabled: false
tools:
shellcheck:
enabled: true # ✅ they have .sh scripts in /scripts
markdownlint:
enabled: true # ✅ heavy docs contribution
languagetool:
enabled: true # ✅ useful for international doc contributors
level: "default"
disabled_categories:
- "TYPOGRAPHY" # too nitpicky for code comments
ruff:
enabled: false # ❌ not a Python project
biome:
enabled: false # ❌ they use ESLint already (.eslintignore exists)
ast-grep:
essential_rules: true
chat:
auto_reply: true

View File

@@ -29,6 +29,7 @@ const { loadUserAndOverrideConfig } = require('./lib/meteorRspackConfigHelpers.j
const { prepareMeteorRspackConfig } = require("./lib/meteorRspackConfigFactory");
const { extractLocalDependencies } = require('./lib/localDependenciesHelpers.js');
// Safe require that doesn't throw if the module isn't found
function safeRequire(moduleName) {
try {
@@ -650,7 +651,7 @@ module.exports = async function (inMeteor = {}, argv = {}) {
port: devServerPort,
devMiddleware: {
writeToDisk: (filePath) =>
/\.(html)$/.test(filePath) && !filePath.includes(".hot-update."),
/\.(html)$/.test(filePath) || filePath.endsWith('sw.js'),
},
onListening(devServer) {
if (!devServer) return;

View File

@@ -202,7 +202,7 @@ export function checkReactInstalled() {
const appDir = getMeteorAppDir();
// Check if React is a dependency in the project
const isReactInstalled = checkNpmDependencyExists('react', { cwd: appDir });
const isReactInstalled = checkNpmDependencyExists('react', { cwd: appDir }) && !checkNpmDependencyExists('preact', { cwd: appDir });
if (isReactInstalled) {
// Set environment variable to indicate React is enabled

View File

@@ -827,6 +827,8 @@ new GenerateSW({
})
```
During development, the HMR dev server writes `sw.js` to disk by default, so build-generated service workers are served by Meteor's web server without extra configuration. If your service worker uses a different filename, see the [Dev Server](#dev-server) section for how to extend `writeToDisk`.
### Dev Server
You can customize the Rspack dev server much like you would when using meteor run. Any [devServer option listed in the official Rspack guide](https://rspack.rs/config/dev-server) can be applied in your apps [`rspack.config.js`](./rspack-bundler-integration.md#custom-rspackconfigjs).
@@ -840,6 +842,23 @@ RSPACK_DEVSERVER_PORT=3232 meteor run
The reason is that the Rspack dev server is handled by the Meteor so it can make both dev server works together, and the info of the port needs to be properly shared via the env.
During development, the HMR dev server keeps most build assets in memory and only writes HTML files and `sw.js` to disk by default. This means if your build pipeline generates files that need to be served from the root path, like `service-worker.js`, `manifest.json`, or any other output that Meteor's web server should serve directly, you can extend `writeToDisk` in your `rspack.config.js`:
```js
const { defineConfig } = require('@meteorjs/rspack');
module.exports = defineConfig(Meteor => ({
devServer: {
devMiddleware: {
writeToDisk: (filePath) =>
/\.(html)$/.test(filePath) || filePath.endsWith('service-worker.js'),
},
},
}));
```
In production, all build outputs are written to disk normally, so this only affects local development.
### Disable Plugins
Meteor allows disabling Rspack plugins that are added by default or through presets. This is useful when troubleshooting build issues or replacing a plugin with a custom implementation.