Skip to content

Commit 676ca39

Browse files
QWp6tretlehs
authored andcommitted
Acorn asset manager config (#2220)
1 parent 6bd5d65 commit 676ca39

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

config/assets.php

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,39 @@
44

55
/*
66
|--------------------------------------------------------------------------
7-
| Assets Directory URI
7+
| Default Assets Manifest
88
|--------------------------------------------------------------------------
99
|
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.
1313
|
1414
*/
1515

16-
'uri' => get_theme_file_uri('/dist'),
16+
'default' => 'theme',
1717

1818
/*
1919
|--------------------------------------------------------------------------
20-
| Assets Directory Path
20+
| Assets Manifests
2121
|--------------------------------------------------------------------------
2222
|
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.
2527
|
26-
*/
27-
28-
'path' => get_theme_file_path('/dist'),
29-
30-
/*
31-
|--------------------------------------------------------------------------
32-
| Assets Manifest
33-
|--------------------------------------------------------------------------
28+
| Supported Strategies: "relative"
3429
|
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.
3931
|
4032
*/
4133

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+
]
4342
];

0 commit comments

Comments
 (0)