Skip to content

Commit 109c4f3

Browse files
committed
minor #14520 [Encore] Fix CSS path (ker0x)
This PR was submitted for the 5.x branch but it was merged into the 5.1 branch instead. Discussion ---------- [Encore] Fix CSS path Fix CSS path according to the new structure Commits ------- cca7466 [Encore] Fix CSS path
2 parents 4f10c3d + cca7466 commit 109c4f3

File tree

2 files changed

+6
-6
lines changed

2 files changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ application: it will *require* all of the dependencies it needs (e.g. jQuery or
1919
2020
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)