Skip to content

Commit a7f8094

Browse files
committed
Address remaining review comments for merge
1 parent b22539a commit a7f8094

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

Procfile.dev-prod-assets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ redis: redis-server
77
# upon saving rather than when you refresh your browser page.
88
# Note, if using React on Rails localization you will need to run
99
# `bundle exec rake react_on_rails:locale` before you run bin/shakapacker
10-
rspack: sh -c 'bundle exec rake react_on_rails:locale && rm -rf public/packs/* && bin/shakapacker -w'
10+
rspack: sh -c 'bundle exec rake react_on_rails:locale && (rm -rf public/packs/* || true) && bin/shakapacker -w'

Procfile.dev-static

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ redis: redis-server
88
# Note, if using React on Rails localization you will need to run
99
# `bundle exec rake react_on_rails:locale` before you run bin/shakapacker
1010
# Sleep 5 to allow other rescript files to build
11-
rspack: sleep 5 && sh -c 'bundle exec rake react_on_rails:locale && rm -rf public/packs/* && bin/shakapacker -w'
11+
rspack: sleep 5 && sh -c 'bundle exec rake react_on_rails:locale && (rm -rf public/packs/* || true) && bin/shakapacker -w'

Procfile.dev-static-assets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ redis: redis-server
77
# upon saving rather than when you refresh your browser page.
88
# Note, if using React on Rails localization you will need to run
99
# `bundle exec rake react_on_rails:locale` before you run bin/shakapacker
10-
rspack: sh -c 'bundle exec rake react_on_rails:locale && rm -rf public/packs/* && bin/shakapacker -w'
10+
rspack: sh -c 'bundle exec rake react_on_rails:locale && (rm -rf public/packs/* || true) && bin/shakapacker -w'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ assets_bundler: rspack
197197
### Configuration Files
198198

199199
All bundler configuration is in `config/webpack/`:
200-
- `webpack.config.js` - Main Shakapacker entry point
200+
- `webpackConfig.js` - Main Shakapacker entry point
201201
- `commonWebpackConfig.js` - Shared configuration
202202
- `clientWebpackConfig.js` - Client bundle settings
203203
- `serverWebpackConfig.js` - Server-side rendering bundle

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('returns true when assets_bundler is webpack', () => {
83+
it('returns false 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()).toBe(true);
88+
expect(utils.isRspack()).toBe(false);
8989
});
9090
});
9191

config/webpack/bundlerUtils.js

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

4040
/**
41-
* Indicates this repository is standardized on Rspack.
41+
* Checks whether the configured bundler is Rspack.
4242
*
43-
* @returns {boolean} Always true
43+
* @returns {boolean} True when assets_bundler is rspack
4444
*/
45-
const isRspack = () => true;
45+
const isRspack = () => config.assets_bundler === 'rspack';
4646

4747
/**
4848
* Gets the CSS extraction plugin for Rspack.

0 commit comments

Comments
 (0)