File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ by the normal `webpack-dev-server`_. For example:
24
24
25
25
This will start a server at ``https://localhost:9000 ``.
26
26
27
- Hot Module Replace HMR
28
- ----------------------
27
+ Hot Module Replacement HMR
28
+ --------------------------
29
29
30
30
Encore *does * support `HMR `_, but only in some areas. To activate it, pass the ``--hot ``
31
31
option:
Original file line number Diff line number Diff line change @@ -21,7 +21,18 @@ Then, activate the ``vue-loader`` in ``webpack.config.js``:
21
21
+ .enableVueLoader()
22
22
;
23
23
24
- That's it! Any ``.vue `` files that you require will be processed correctly.
24
+ That's it! Any ``.vue `` files that you require will be processed correctly. You can
25
+ also configure the `vue-loader options `_ via a callback:
26
+
27
+ .. code-block :: javascript
28
+
29
+ .enableVueLoader (function (options ) {
30
+ // https://vue-loader.vuejs.org/en/configurations/advanced.html
31
+
32
+ options .preLoaders = {
33
+ js: ' /path/to/custom/loader'
34
+ };
35
+ });
25
36
26
37
Hot Module Replacement (HMR)
27
38
----------------------------
@@ -41,4 +52,5 @@ updated styles still requires a page refresh.
41
52
See :doc: `/frontend/encore/dev-server ` for more details.
42
53
43
54
.. _`babel-preset-react` : https://babeljs.io/docs/plugins/preset-react/
44
- .. _`Vue.js` : https://vuejs.org/
55
+ .. _`Vue.js` : https://vuejs.org/
56
+ .. _`vue-loader options` : https://vue-loader.vuejs.org/en/configurations/advanced.html
You can’t perform that action at this time.
0 commit comments