Skip to content

Commit f9c71c2

Browse files
committed
Merge branch '5.0'
* 5.0: clarify empty string behavior without lower bound given adding info about Vue build
2 parents 0d78115 + cfc8ef9 commit f9c71c2

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

frontend/encore/vuejs.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,38 @@ Any ``.vue`` files that you require will be processed correctly. You can also
2323
configure 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+
2658
Hot Module Replacement (HMR)
2759
----------------------------
2860

reference/constraints/Length.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ If set to ``true``, empty strings are considered valid (which is the same
123123
behavior as previous Symfony versions). The default ``false`` value considers
124124
empty strings not valid.
125125

126+
.. caution::
127+
128+
This option does not have any effect when no minimum length is given.
129+
126130
charset
127131
~~~~~~~
128132

0 commit comments

Comments
 (0)