-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Encore] Changing dev-server to use the new server option #16833
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,6 @@ you're done: the paths in your templates will automatically point to the dev ser | |
dev-server Options | ||
------------------ | ||
|
||
.. caution:: | ||
|
||
Encore uses ``webpack-dev-server`` version 4, which at the time of Encore's | ||
1.0 release was still in beta and was not documented. See the `4.0 CHANGELOG`_ | ||
for changes. | ||
|
||
The ``dev-server`` command supports all the options defined by `webpack-dev-server`_. | ||
You can set these options via command line options: | ||
|
||
|
@@ -54,16 +48,16 @@ method in your ``webpack.config.js`` file: | |
// ... | ||
|
||
.configureDevServerOptions(options => { | ||
options.https = { | ||
key: '/path/to/server.key', | ||
cert: '/path/to/server.crt', | ||
options.server = { | ||
type: 'https', | ||
options: { | ||
key: '/path/to/server.key', | ||
cert: '/path/to/server.crt', | ||
} | ||
} | ||
}) | ||
; | ||
|
||
.. versionadded:: 0.28.4 | ||
|
||
The ``Encore.configureDevServerOptions()`` method was introduced in Encore 0.28.4. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That version is now very old, so just some housekeeping |
||
|
||
Enabling HTTPS using the Symfony Web Server | ||
------------------------------------------- | ||
|
@@ -82,18 +76,14 @@ server SSL certificate: | |
// ... | ||
|
||
+ .configureDevServerOptions(options => { | ||
+ options.https = { | ||
+ pfx: path.join(process.env.HOME, '.symfony/certs/default.p12'), | ||
+ options.server = { | ||
+ type: 'https', | ||
+ options: { | ||
+ pfx: path.join(process.env.HOME, '.symfony/certs/default.p12'), | ||
+ } | ||
+ } | ||
+ }) | ||
|
||
|
||
.. caution:: | ||
|
||
Make sure to **not** pass the ``--https`` flag at the command line when | ||
running ``encore dev-server``. This flag was required before 1.0, but now | ||
will cause your config to be overridden. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The first part of the note is now quite old as 1.0 was released about 2 years ago. For the second part (about overridden), I can't find anything in the code that would suggest that also passing |
||
|
||
CORS Issues | ||
----------- | ||
|
||
|
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.
Removed as the note was pretty old now