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``.
2929Hot Module Replacement HMR
3030--------------------------
3131
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 ``
3334option:
3435
3536.. code-block :: terminal
3637
3738 $ ./node_modules/.bin/encore dev-server --hot
3839
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.
4159
4260.. _`webpack-dev-server` : https://webpack.js.org/configuration/dev-server/
4361.. _`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