diff --git a/lib/assets.php b/lib/assets.php
index 775798c..70af392 100644
--- a/lib/assets.php
+++ b/lib/assets.php
@@ -53,14 +53,13 @@ class JsonManifest {
}
function asset_path($filename) {
- $dist_dir = '/dist/';
- $dist_path = get_template_directory_uri() . $dist_dir;
+ $dist_path = get_template_directory_uri() . DIST_DIR;
$directory = dirname($filename) . '/';
$file = basename($filename);
static $manifest;
if (empty($manifest)) {
- $manifest_path = get_template_directory() . $dist_dir . 'assets.json';
+ $manifest_path = get_template_directory() . DIST_DIR . 'assets.json';
$manifest = new JsonManifest($manifest_path);
}
@@ -131,7 +130,7 @@ function jquery_local_fallback($src, $handle = null) {
static $add_jquery_fallback = false;
if ($add_jquery_fallback) {
- echo '' . "\n";
+ echo '' . "\n";
$add_jquery_fallback = false;
}
diff --git a/lib/config.php b/lib/config.php
index 46d3c7c..d5ffad2 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -27,6 +27,11 @@ if (!defined('WP_ENV')) {
define('WP_ENV', 'production');
}
+if (!defined('DIST_DIR')) {
+ // Path to the build directory for front-end assets
+ define('DIST_DIR', '/dist/');
+}
+
/**
* Define which pages shouldn't have the sidebar
*/