-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update webpack dev server configuration #276
Update webpack dev server configuration #276
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me know when ready to merge.
@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.
I have made some refactoring.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* 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
* 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]>
) * 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]>
Summary
This PR adds/modifies the dev-server config based on the standard Webpack dev-server configuration.
Pull Request checklist
Other Information
closes #217