8000 Merge branch '5.1' into 5.x · symfony/symfony-docs@2a4924b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2a4924b

Browse files
committed
Merge branch '5.1' into 5.x
* 5.1: [Encore] Fix CSS path Update simple-example.rst
2 parents 0c67f54 + 109c4f3 commit 2a4924b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

frontend/encore/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Next, open the new ``assets/app.js`` file which contains some JavaScript code
143143
*/
144144
145145
// any CSS you import will output into a single css file (app.css in this case)
146-
import '../css/app.css';
146+
import './styles/app.css';
147147
148148
// Need jQuery? Install it with "yarn add jquery", then uncomment to import it.
149149
// import $ from 'jquery';

frontend/encore/simple-example.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ application: it will *require* all of the dependencies it needs (e.g. jQuery or
1717
// assets/app.js
1818
// ...
1919
20-
import '../css/app.css';
20+
import './styles/app.css';
2121
22-
// var $ = require('jquery');
22+
// import $ from 'jquery';
2323
2424
Encore's job (via Webpack) is simple: to read and follow *all* of the ``require()``
2525
statements and create one final ``app.js`` (and ``app.css``) that contains *everything*
@@ -204,8 +204,8 @@ To import values, use ``import``:
204204
.. code-block:: diff
205205
206206
// assets/app.js
207-
- require('../css/app.css');
208-
+ import '../css/app.css';
207+
- require('../styles/app.css');
208+
+ import './styles/app.css';
209209
210210
- var $ = require('jquery');
211211
+ import $ from 'jquery';
@@ -292,8 +292,8 @@ file to ``app.scss`` and update the ``import`` statement:
292292
.. code-block:: diff
293293
294294
// assets/app.js
295-
- import '../css/app.css';
296-
+ import '../css/app.scss';
295+
- import './styles/app.css';
296+
+ import './styles/app.scss';
297297
298298
Then, tell Encore to enable the Sass pre-processor:
299299

0 commit comments

Comments
 (0)
0