|
4 | 4 |
|
5 | 5 | /* |
6 | 6 | |-------------------------------------------------------------------------- |
7 | | - | Assets Directory URI |
| 7 | + | Default Assets Manifest |
8 | 8 | |-------------------------------------------------------------------------- |
9 | 9 | | |
10 | | - | The asset manifest contains relative paths to your assets. This URI will |
11 | | - | be prepended when using Sage's asset management system. Change this if |
12 | | - | you are pushing to a CDN. |
| 10 | + | Here you may specify the default asset manifest that should be used. |
| 11 | + | The "theme" manifest is recommended as the default as it cedes ultimate |
| 12 | + | authority of your application's assets to the theme. |
13 | 13 | | |
14 | 14 | */ |
15 | 15 |
|
16 | | - 'uri' => get_theme_file_uri('/dist'), |
| 16 | + 'default' => 'theme', |
17 | 17 |
|
18 | 18 | /* |
19 | 19 | |-------------------------------------------------------------------------- |
20 | | - | Assets Directory Path |
| 20 | + | Assets Manifests |
21 | 21 | |-------------------------------------------------------------------------- |
22 | 22 | | |
23 | | - | The asset manifest contains relative paths to your assets. This path will |
24 | | - | be prepended when using Sage's asset management system. |
| 23 | + | Manifests contain lists of assets that are referenced by static keys that |
| 24 | + | point to dynamic locations, such as a cache-busted location. A manifest |
| 25 | + | may employ any number of strategies for determining absolute local and |
| 26 | + | remote paths to assets. |
25 | 27 | | |
26 | | - */ |
27 | | - |
28 | | - 'path' => get_theme_file_path('/dist'), |
29 | | - |
30 | | - /* |
31 | | - |-------------------------------------------------------------------------- |
32 | | - | Assets Manifest |
33 | | - |-------------------------------------------------------------------------- |
| 28 | + | Supported Strategies: "relative" |
34 | 29 | | |
35 | | - | Your asset manifest is used by Sage to assist WordPress and your views |
36 | | - | with rendering the correct URLs for your assets. This is especially |
37 | | - | useful for statically referencing assets with dynamically changing names |
38 | | - | as in the case of cache-busting. |
| 30 | + | Note: We will add first-party support for more strategies in the future. |
39 | 31 | | |
40 | 32 | */ |
41 | 33 |
|
42 | | - 'manifest' => get_theme_file_path('/dist/mix-manifest.json'), |
| 34 | + 'manifests' => [ |
| 35 | + 'theme' => [ |
| 36 | + 'strategy' => 'relative', |
| 37 | + 'path' => get_theme_file_path('/dist'), |
| 38 | + 'uri' => get_theme_file_uri('/dist'), |
| 39 | + 'manifest' => get_theme_file_path('/dist/assets.json'), |
| 40 | + ] |
| 41 | + ] |
43 | 42 | ]; |
0 commit comments