From 3fac9c0404d921f74213015ac74631023ee709f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Tue, 24 Mar 2026 15:38:06 +0100 Subject: [PATCH 1/5] update `writeToDisk` logic in Rspack dev server to include `sw.js`, and add documentation on serving root path files during development --- npm-packages/meteor-rspack/rspack.config.js | 3 ++- .../rspack-bundler-integration.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/npm-packages/meteor-rspack/rspack.config.js b/npm-packages/meteor-rspack/rspack.config.js index ea1fa3da79..c784879958 100644 --- a/npm-packages/meteor-rspack/rspack.config.js +++ b/npm-packages/meteor-rspack/rspack.config.js @@ -28,6 +28,7 @@ const { const { loadUserAndOverrideConfig } = require('./lib/meteorRspackConfigHelpers.js'); const { prepareMeteorRspackConfig } = require("./lib/meteorRspackConfigFactory"); + // Safe require that doesn't throw if the module isn't found function safeRequire(moduleName) { try { @@ -643,7 +644,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; diff --git a/v3-docs/docs/about/modern-build-stack/rspack-bundler-integration.md b/v3-docs/docs/about/modern-build-stack/rspack-bundler-integration.md index 46ee9d8fe2..b376088bb5 100644 --- a/v3-docs/docs/about/modern-build-stack/rspack-bundler-integration.md +++ b/v3-docs/docs/about/modern-build-stack/rspack-bundler-integration.md @@ -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 app’s [`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. From d7638494e717667b1e5fa97cbf29b792b5cda8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 26 Mar 2026 16:56:15 +0100 Subject: [PATCH 2/5] add .coderabbit.yml configuration for review automation --- .coderabbit.yalm | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .coderabbit.yalm diff --git a/.coderabbit.yalm b/.coderabbit.yalm new file mode 100644 index 0000000000..b4edd06cab --- /dev/null +++ b/.coderabbit.yalm @@ -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: true + 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 From 69f36ab27a64fc45704ab2c28ed62e3330abadfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 26 Mar 2026 17:03:22 +0100 Subject: [PATCH 3/5] update .coderabbit.yaml configuration --- .coderabbit.yalm => .coderabbit.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .coderabbit.yalm => .coderabbit.yaml (100%) diff --git a/.coderabbit.yalm b/.coderabbit.yaml similarity index 100% rename from .coderabbit.yalm rename to .coderabbit.yaml From a99f6e193789370a5738782e8e3ea08eb02cffd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 26 Mar 2026 17:07:22 +0100 Subject: [PATCH 4/5] re-run checks From d5b8f6c904bc102197b63c44eca77175dc2bfed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 26 Mar 2026 17:41:57 +0100 Subject: [PATCH 5/5] update .coderabbit.yaml to disable review_status --- .coderabbit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index b4edd06cab..ba6de87c22 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -8,7 +8,7 @@ reviews: high_level_summary: true poem: false # serious OSS platform in_progress_fortune: false # noise - review_status: true + review_status: false review_details: false commit_status: true collapse_walkthrough: true