File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ files into your final output directory.
36
36
37
37
Encore
38
38
// ...
39
- .setOutputPath('web /build/')
39
+ .setOutputPath('public /build/')
40
40
41
41
+ .copyFiles({
42
42
+ from: './assets/images',
@@ -48,16 +48,16 @@ files into your final output directory.
48
48
+ //pattern: /\.(png|jpg|jpeg)$/
49
49
+ })
50
50
51
- This will copy all files from ``assets/images `` into ``web /build `` (the output
51
+ This will copy all files from ``assets/images `` into ``public /build `` (the output
52
52
path). If you have :doc: `versioning enabled <versioning >`, the copied files will
53
53
include a hash based on their content.
54
54
55
55
To render inside Twig, use the ``asset() `` function:
56
56
57
- {# assets/images/logo.png was copied to web /build/logo.png #}
57
+ {# assets/images/logo.png was copied to public /build/logo.png #}
58
58
<img src="{{ asset('build/logo.png') }}"
59
59
60
- {# assets/images/subdir/logo.png was copied to web /build/subdir/logo.png #}
60
+ {# assets/images/subdir/logo.png was copied to public /build/subdir/logo.png #}
61
61
<img src="{{ asset('build/subdir/logo.png') }}"
62
62
63
63
Make sure you've enabled the :ref: `json_manifest_path <load-manifest-files >` option,
Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ To build the assets, run:
76
76
77
77
Congrats! You now have three new files:
78
78
79
- * ``web /build/app.js `` (holds all the JavaScript for your "app" entry)
80
- * ``web /build/app.css `` (holds all the CSS for your "app" entry)
81
- * ``web /build/runtime.js `` (a file that helps Webpack do its job)
79
+ * ``public /build/app.js `` (holds all the JavaScript for your "app" entry)
80
+ * ``public /build/app.css `` (holds all the CSS for your "app" entry)
81
+ * ``public /build/runtime.js `` (a file that helps Webpack do its job)
82
82
83
83
Next, include these in your base layout file. Two Twig helpers from WebpackEncoreBundle
84
84
can do most of the work for you:
You can’t perform that action at this time.
0 commit comments