diff --git a/public/app/themes/clarity/inc/enqueue.php b/public/app/themes/clarity/inc/enqueue.php index 0aacaf76b..eb00b8b11 100644 --- a/public/app/themes/clarity/inc/enqueue.php +++ b/public/app/themes/clarity/inc/enqueue.php @@ -9,7 +9,7 @@ function enqueue_clarity_scripts() { - define('MOJ_DIST_PATH', get_template_directory_uri() . '/dist'); + define('MOJ_DIST_PATH', get_stylesheet_directory_uri() . '/dist'); // CSS wp_enqueue_style('style', mix_asset('/css/style.css'), array(), null, 'screen'); @@ -45,15 +45,15 @@ function enqueue_clarity_scripts() */ function mix_asset($filename) { - global $webroot_dir; + /*global $webroot_dir; $manifest = file_get_contents($webroot_dir . '/app/themes/clarity/dist/mix-manifest.json'); $manifest = json_decode($manifest, true); if (!isset($manifest[$filename])) { error_log("Mix asset '$filename' does not exist in manifest."); - } - return MOJ_DIST_PATH . $manifest[$filename]; + }*/ + return MOJ_DIST_PATH . $filename; } /** diff --git a/public/app/themes/clarity/webpack.mix.js b/public/app/themes/clarity/webpack.mix.js index 5b3c690d0..3d1f32b85 100644 --- a/public/app/themes/clarity/webpack.mix.js +++ b/public/app/themes/clarity/webpack.mix.js @@ -1,4 +1,4 @@ -let mix = require('laravel-mix') +let mix = require('laravel-mix'); let stylDeps = { stylusOptions: { @@ -6,7 +6,7 @@ let stylDeps = { } }; -mix.setPublicPath('./dist/') +mix.setPublicPath('./dist/'); /*******************/ mix.js('src/globals/js/script-loader.js', 'dist/js/main.min.js') @@ -19,10 +19,10 @@ mix.js('src/globals/js/script-loader.js', 'dist/js/main.min.js') .copy('./node_modules/jquery/dist/jquery.min.js', 'dist/js/') .copy('src/globals/fonts/*', 'dist/fonts/') .copy('src/globals/images', 'dist/images/') - .options({ processCssUrls: false }) + .options({ processCssUrls: false }); if (mix.inProduction()) { - mix.version() + mix.version(); } else { - mix.sourceMaps() + mix.sourceMaps(); }