Skip to content

Commit 04bd8e3

Browse files
committed
[Encore] Fix CSS path
1 parent 707580e commit 04bd8e3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

frontend/encore/installation.rst

+1-1
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

+6-6
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*
@@ -198,8 +198,8 @@ To import values, use ``import``:
198198
.. code-block:: diff
199199
200200
// assets/app.js
201-
- require('../css/app.css');
202-
+ import '../css/app.css';
201+
- require('../styles/app.css');
202+
+ import './styles/app.css';
203203
204204
- var $ = require('jquery');
205205
+ import $ from 'jquery';
@@ -286,8 +286,8 @@ file to ``app.scss`` and update the ``import`` statement:
286286
.. code-block:: diff
287287
288288
// assets/app.js
289-
- import '../css/app.css';
290-
+ import '../css/app.scss';
289+
- import './styles/app.css';
290+
+ import './styles/app.scss';
291291
292292
Then, tell Encore to enable the Sass pre-processor:
293293

0 commit comments

Comments
 (0)