File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,24 @@ is the main config file for both Webpack and Webpack Encore:
98
98
99
99
module .exports = Encore .getWebpackConfig ();
100
100
101
- Next, create a new ``assets/js/app.js `` file with some basic JavaScript * and *
102
- import some JavaScript :
101
+ Next, open the new ``assets/js/app.js `` file which contains some JavaScript code
102
+ * and * imports some CSS :
103
103
104
104
.. code-block :: javascript
105
105
106
106
// assets/js/app.js
107
-
108
- require (' ../css/app.css' );
107
+ /*
108
+ * Welcome to your app's main JavaScript file!
109
+ *
110
+ * We recommend including the built version of this JavaScript file
111
+ * (and its CSS file) in your base layout (base.html.twig).
112
+ */
113
+
114
+ // any CSS you import will output into a single css file (app.css in this case)
115
+ import ' ../css/app.css' ;
116
+
117
+ // Need jQuery? Install it with "yarn add jquery", then uncomment to import it.
118
+ // import $ from 'jquery';
109
119
110
120
console .log (' Hello Webpack Encore' );
111
121
You can’t perform that action at this time.
0 commit comments