Skip to content

Commit

Permalink
Describe keys different from webpack-dev-server in generated webpacke…
Browse files Browse the repository at this point in the history
…r.yml (shakacode#201)

Co-authored-by: Alexey Romanov <[email protected]>
Co-authored-by: Justin Gordon <[email protected]>
  • Loading branch information
3 people authored Dec 2, 2022
1 parent fc900f0 commit 1b7c050
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changes since last non-beta release.
_Please add entries here for your pull requests that are not yet released._

### Improved
- Describe keys different from `webpack-dev-server` in generated `webpacker.yml`. [PR 194](https://github.com/shakacode/shakapacker/pull/194) by [alexeyr](https://github.com/alexeyr).
- Allow webpack-cli v5 [PR 216](https://github.com/shakacode/shakapacker/pull/216) by [tagliala](https://github.com/tagliala).

## [v6.5.4] - November 4, 2022
Expand Down
9 changes: 6 additions & 3 deletions lib/install/config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ development:
compiler_strategy: mtime

# Reference: https://webpack.js.org/configuration/dev-server/
# Keys not described there are documented inline and in https://github.com/shakacode/shakapacker/
dev_server:
https: false
host: localhost
port: 3035
# Hot Module Replacement updates modules while the application is running without a full reload
# Used instead of the `hot` key in https://webpack.js.org/configuration/dev-server/#devserverhot
hmr: false
# If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure
# that you add style-loader to your project dependencies.
Expand All @@ -70,13 +72,14 @@ development:
overlay: true
# May also be a string
# webSocketURL:
# hostname: "0.0.0.0"
# pathname: "/ws"
# hostname: '0.0.0.0'
# pathname: '/ws'
# port: 8080
# Should we use gzip compression?
compress: true
# Note that apps that do not check the host are vulnerable to DNS rebinding attacks
allowed_hosts: "all"
allowed_hosts: 'all'
# Shows progress and colorizes output of bin/webpacker[-dev-server]
pretty: true
headers:
'Access-Control-Allow-Origin': '*'
Expand Down
10 changes: 8 additions & 2 deletions test/mounted_app/test/dummy/config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ development:
port: 3035
public: localhost:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
# If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure
# that you add style-loader to your project dependencies.
#
# If you want to instead deliver CSS via <link> with the mini-extract-css-plugin, set inline_css to false.
# In that case, style-loader is not needed as a dependency.
#
# mini-extract-css-plugin is a required dependency in both cases.
inline_css: true
overlay: true
disable_host_check: true
use_local_ip: false
Expand Down
10 changes: 8 additions & 2 deletions test/test_app/config/webpacker_other_location.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ development:
port: 3035
public: localhost:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
# If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure
# that you add style-loader to your project dependencies.
#
# If you want to instead deliver CSS via <link> with the mini-extract-css-plugin, set inline_css to false.
# In that case, style-loader is not needed as a dependency.
#
# mini-extract-css-plugin is a required dependency in both cases.
inline_css: true
overlay: true
disable_host_check: true
use_local_ip: false
Expand Down

0 comments on commit 1b7c050

Please sign in to comment.