Skip to content

Commit b22539a

Browse files
committed
Address remaining review nits for merge readiness
1 parent c7c4a4c commit b22539a

5 files changed

Lines changed: 9 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ See package.json and Gemfile for versions
119119
1. [Babel transpiler](https://github.com/babel/babel)
120120
1. [Ruby on Rails 8](http://rubyonrails.org/) for backend app and comparison with plain HTML
121121
1. [Thruster](https://github.com/basecamp/thruster) - Zero-config HTTP/2 proxy for optimized asset delivery
122-
1. [Heroku deployment guide](https://devcenter.heroku.com/articles/getting-started-with-rails7)
122+
1. [Heroku deployment guide](https://devcenter.heroku.com/articles/getting-started-with-rails8)
123123
1. [Deployment to the ControlPlane](.controlplane/readme.md)
124124
1. [Turbolinks 5](https://github.com/turbolinks/turbolinks)
125125
1. [Tailwind CSS](https://github.com/tailwindlabs/tailwindcss)

client/__tests__/webpack/bundlerUtils.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ describe('bundlerUtils', () => {
8080
expect(utils.isRspack()).toBe(true);
8181
});
8282

83-
it('throws when assets_bundler is webpack', () => {
83+
it('returns true when assets_bundler is webpack', () => {
8484
mockConfig.assets_bundler = 'webpack';
8585
jest.doMock('shakapacker', () => ({ config: mockConfig }));
8686
const utils = require('../../../config/webpack/bundlerUtils');
8787

88-
expect(() => utils.isRspack()).toThrow('configured for Rspack only');
88+
expect(utils.isRspack()).toBe(true);
8989
});
9090
});
9191

config/webpack/bundlerUtils.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ const getBundler = () => {
3838
};
3939

4040
/**
41-
* Validates rspack-only mode and returns true.
41+
* Indicates this repository is standardized on Rspack.
4242
*
43-
* @returns {boolean} Always true after validation
43+
* @returns {boolean} Always true
4444
*/
45-
const isRspack = () => {
46-
ensureRspack();
47-
return true;
48-
};
45+
const isRspack = () => true;
4946

5047
/**
5148
* Gets the CSS extraction plugin for Rspack.

config/webpack/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const devBuild = process.env.NODE_ENV === 'development';
2+
// Set by shakapacker dev-server for both webpack and rspack.
23
const isHMR = process.env.WEBPACK_DEV_SERVER === 'TRUE';
34
const { getBundler } = require('./bundlerUtils');
45
const environment = require('./environment');

config/webpack/development.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'development';
55

66
const webpackConfig = require('./webpackConfig');
77

8-
// Rspack HMR/refresh is handled by Shakapacker + @rspack/plugin-react-refresh.
8+
// Shakapacker auto-registers ReactRefreshRspackPlugin in dev-server mode
9+
// when @rspack/plugin-react-refresh is present.
910
module.exports = webpackConfig();

0 commit comments

Comments
 (0)