Update webpack dev server configuration#276
Merged
justin808 merged 14 commits intoshakapacker-v7from Apr 15, 2023
Merged
Conversation
In this commit, I add support for those keys written in snake-case to be added to the configurations in camel-case format, if they are set.
5c68c3a to
21cf806
Compare
21cf806 to
5e77f91
Compare
justin808
reviewed
Apr 11, 2023
justin808
requested changes
Apr 11, 2023
Member
justin808
left a comment
There was a problem hiding this comment.
Please let me know when ready to merge.
Contributor
Author
|
@justin808 Am I right? |
The logic for mapping keys in the shakapacker.yml file is straightforward: if a key is specific to webpack, it will be mapped to camelCase, otherwise, the key will remain as is. This means that any other key that is not specific to webpack (such as random_key) will remain accessible in its original form.
Contributor
Author
|
I have made some refactoring.
|
ahangarha
added a commit
that referenced
this pull request
Apr 19, 2023
* Set allowed_host to auto as per webpack recommendation * Use server: http instead of https: false * Remove server entry from config and improve value detection * Add support for hash value for server entry * Update dev_server_runner to use protocol * Add server or https entry conditionally * Add support for other standard devServer config In this commit, I add support for those keys written in snake-case to be added to the configurations in camel-case format, if they are set. The logic for mapping keys in the shakapacker.yml file is straightforward: if a key is specific to webpack, it will be mapped to camelCase; otherwise, the key will remain as is. Any other key not specific to webpack (such as random_key) will remain accessible in its original form. * Run the logic only in a dev environment * Set specific exception type for rescue
ahangarha
added a commit
that referenced
this pull request
Apr 27, 2023
* Rename Webpacker instances to shakapacker (#245) * Add backward compatibility (#252) * Update docs for spelling change (#263) * Fix backward compatibility for setting WEBPACKER_CONFIG in webpack.config.js (#266) * Remove redundant code for enhancing precompile task (#270) * Update webpack dev server configuration (#276) * Stop stripping top level dirs (#283) * Improve source_entry_path robustness (#284) --------- Co-authored-by: Tom Dracz <[email protected]>
justin808
added a commit
that referenced
this pull request
May 8, 2023
) * Changed default webpackConfig to be either a function that returns a new object or the a global object * generateWebpackConfig => new object * globalMutableWebpackConfig => old, mutable object * doc updates * Fixed broken webpack-dev-server * Improved handling of all available webpack-dev-server keys done in #276 --------- Co-authored-by: Mostafa Ahangarha <[email protected]>
This was referenced Mar 9, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds/modifies the dev-server config based on the standard Webpack dev-server configuration.
Pull Request checklist
Other Information
closes #217