File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,34 @@ This will start a server at ``https://localhost:9000``.
29
29
Hot Module Replacement HMR
30
30
--------------------------
31
31
32
- Encore *does * support `HMR `_, but only in some areas. To activate it, pass the ``--hot ``
32
+ Encore *does * support `HMR `_ for :doc: `Vue.js </frontend/encore/vuejs >`, but
33
+ does *not * work for styles anywhere at this time. To activate it, pass the ``--hot ``
33
34
option:
34
35
35
36
.. code-block :: terminal
36
37
37
38
$ ./node_modules/.bin/encore dev-server --hot
38
39
39
- HMR currently works for :doc: `Vue.js </frontend/encore/vuejs >`, but does *not * work
40
- for styles anywhere at this time.
40
+ If you experience issues related to CORS (Cross Origin Resource Sharing), add
41
+ the ``--disable-host-check `` and ``--port `` options to the ``dev-server ``
42
+ command in the ``package.json `` file:
43
+
44
+ .. code-block :: diff
45
+
46
+ {
47
+ ...
48
+ "scripts": {
49
+ - "dev-server": "encore dev-server",
50
+ + "dev-server": "encore dev-server --port 8080 --disable-host-check",
51
+ ...
52
+ }
53
+ }
54
+
55
+ .. caution ::
56
+
57
+ Beware that `it's not recommended to disable host checking `_ in general, but
58
+ here it's required to solve the CORS issue.
41
59
42
60
.. _`webpack-dev-server` : https://webpack.js.org/configuration/dev-server/
43
61
.. _`HMR` : https://webpack.js.org/concepts/hot-module-replacement/
62
+ .. _`it's not recommended to disable host checking` : https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck
You can’t perform that action at this time.
0 commit comments