Skip to content

Commit 3926224

Browse files
committed
Minor tweaks
1 parent 045eaca commit 3926224

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

frontend/encore/vuejs.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ See :doc:`/frontend/encore/dev-server` for more details.
4343
JSX Support
4444
-----------
4545

46-
You can enable `JSX with Vue.js`_ by configuring the 2nd parameter of the ``.enableVueLoader()`` method:
46+
You can enable `JSX with Vue.js`_ by configuring the second parameter of the
47+
``.enableVueLoader()`` method:
4748

4849
.. code-block:: diff
4950
@@ -60,17 +61,17 @@ You can enable `JSX with Vue.js`_ by configuring the 2nd parameter of the ``.ena
6061
+ })
6162
;
6263
63-
Next, run or restart Encore. When you do, you will see an error message helping you
64-
install any missing dependencies. After running that command and restarting
64+
Next, run or restart Encore. When you do, you will see an error message helping
65+
you install any missing dependencies. After running that command and restarting
6566
Encore, you're done!
6667

6768
Your ``.jsx`` files will now be transformed through ``@vue/babel-preset-jsx``.
6869

6970
Using styles
7071
~~~~~~~~~~~~
7172

72-
You can't use ``<style>`` in ``.jsx`` files.
73-
As a workaround, you can import ``.css``, ``.scss``, etc, files manually:
73+
You can't use ``<style>`` in ``.jsx`` files. As a workaround, you can import
74+
``.css``, ``.scss``, etc. files manually:
7475

7576
.. code-block:: javascript
7677
@@ -91,14 +92,15 @@ As a workaround, you can import ``.css``, ``.scss``, etc, files manually:
9192
9293
.. note::
9394

94-
Importing styles this way make them global.
95-
See the next section for scoping them to your component.
95+
Importing styles this way makes them global. See the next section for
96+
scoping them to your component.
9697

9798
Using Scoped Styles
9899
~~~~~~~~~~~~~~~~~~~
99100

100-
You also can't use `Scoped Styles`_ (``<style scoped>``) in ``.jsx`` files.
101-
As a workaround, you can use `CSS Modules`_ by suffixing import paths with ``?module``:
101+
You can't use `Scoped Styles`_ (``<style scoped>``) either in ``.jsx`` files. As
102+
a workaround, you can use `CSS Modules`_ by suffixing import paths with
103+
``?module``:
102104

103105
.. code-block:: javascript
104106
@@ -132,8 +134,8 @@ The output will be something like ``<h1 class="h1_a3dKp">Hello World</h1>``.
132134
Using images
133135
~~~~~~~~~~~~
134136

135-
You can't use ``<img src="./image.png">`` in ``.jsx`` files.
136-
As a workaround, you can import them with ``require()`` function:
137+
You can't use ``<img src="./image.png">`` in ``.jsx`` files. As a workaround,
138+
you can import them with ``require()`` function:
137139

138140
.. code-block:: javascript
139141

0 commit comments

Comments
 (0)