File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,38 @@ Any ``.vue`` files that you require will be processed correctly. You can also
2323configure the `vue-loader options `_ by passing an options callback to
2424``enableVueLoader() ``. See the `Encore's index.js file `_ for detailed documentation.
2525
26+ Runtime Compiler Build
27+ ----------------------
28+
29+ By default, Encore uses a Vue "build" that allows you to compile templates at
30+ runtime. This means that you *can * do either of these:
31+
32+ .. code-block :: javascript
33+
34+ new Vue ({
35+ template: ' <div>{{ hi }}</div>'
36+ })
37+
38+ new Vue ({
39+ el: ' #app' , // where <div id="app"> in your DOM contains the Vue template
40+ });
41+
42+ If you do *not * need this functionality (e.g. you use single file components),
43+ then you can tell Encore to create a *smaller * and CSP-compliant build:
44+
45+ .. code-block :: javascript
46+
47+ // webpack.config.js
48+ // ...
49+
50+ Encore
51+ // ...
52+
53+ .enableVueLoader (() => {}, { runtimeCompilerBuild: false })
54+ ;
55+
56+ You can also silence the recommendation by passing ``runtimeCompilerBuild: true ``.
57+
2658Hot Module Replacement (HMR)
2759----------------------------
2860
You can’t perform that action at this time.
0 commit comments