Skip to content

Commit 2341548

Browse files
Judahmeekjustin808
andauthored
Set merge option to true in WebpackAssetsManifest (#800)
When used with bin/shakapacker, merge must be true in all environments to support users with multiple client configurations. ### Summary <!-- Describe the code changes in your pull request here - were there any bugs you had fixed, features you added, tradeoffs you made? If so, mention them. If these changes have open GitHub issues, tag them here as well to keep the conversation linked. --> ### Pull Request checklist <!-- If any of the items on this checklist do not apply to the PR, both check it out and wrap it by `~`. --> - [ ] Add/update test to cover these changes - [ ] Update documentation - [ ] Update CHANGELOG file ### Other Information <!-- Mention any other important information that might relate to this PR but that don't belong in the summary, like detailed benchmarks or possible follow-up changes. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Fixed** * Manifest merging for multi-client builds now applies across all environments, preventing duplicated or missing asset entries during builds. * **Chores** * Updated asset manifest behavior to consistently merge manifests, ensuring uniform asset bundling and predictable build outputs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Justin Gordon <justin@shakacode.com>
1 parent f7d1bd7 commit 2341548

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
## [Unreleased]
1111

12+
### Fixed
13+
14+
- Extended manifest merging for multiple client configurations to all environments. [PR #800](https://github.com/shakacode/shakapacker/pull/800) by [Judahmeek](https://github.com/Judahmeek).
15+
1216
Changes since the last non-beta release.
1317

1418
### Added

package/plugins/webpack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { requireOrError } = require("../utils/requireOrError")
55
const WebpackAssetsManifest = requireOrError("webpack-assets-manifest")
66
const webpack = requireOrError("webpack")
77
const config = require("../config") as Config
8-
const { isProduction, isDevelopment } = require("../env")
8+
const { isProduction } = require("../env")
99
const { moduleExists } = require("../utils/helpers")
1010

1111
const getPlugins = (): unknown[] => {
@@ -17,7 +17,7 @@ const getPlugins = (): unknown[] => {
1717
const plugins = [
1818
new webpack.EnvironmentPlugin(process.env),
1919
new WebpackAssetsManifestConstructor({
20-
merge: isDevelopment,
20+
merge: true,
2121
entrypoints: true,
2222
writeToDisk: true,
2323
output: config.manifestPath,

0 commit comments

Comments
 (0)