Closed joepagan closed 2 years ago
hrm. At first glance, this does seem to be backward... but as you say, crazy no one has run into this yet. I will look at it futher.
I'll mention that it's not an issue for me, purely because both values are the same, in most cases:
$path = 'js/main.js'
$manifestKey = 'js/main-legacy.js'
$path = 'js/main-legacy.js'
$manifestKey = 'js/main-legacy.js'
$path = 'js/main.js'
$manifestKey = 'js/main.js'
Might have something to do with my Vite config:
<?php
use craft\helpers\App;
return [
'useDevServer' => App::env('ENVIRONMENT') === 'local',
'manifestPath' => '@webroot/dist/manifest.json',
'devServerPublic' => 'http://localhost:3000/',
'serverPublic' => rtrim(App::env('BASE_URL'), '/') . '/dist/',
'errorEntry' => 'js/app.js',
'cacheKeySuffix' => '',
'devServerInternal' => 'http://localhost:3000/',
'checkDevServer' => true,
'includeReactRefreshShim' => false,
'criticalPath' => '',
'criticalSuffix' => '',
];
But otherwise objectively, looks like the comparison isn't correct.
Damn PHP and it's inconsistent function arguments
Yeah I think my code is wrong, and exactly backward!
Thank you @joepagan !
Any time @khalwat feels weird doing something for you for once!
Description
HUnless I have misunderstood the setup process and some of my settings are incorrect, I believe the
strpos
values need to be reversed. Hard to believe that nobody has hit this yet, so I suspect I am the problem, if so sorry for the noise...When debugging here, my
$path
never gets beyond thiscontinue
.before:
after:
This change does appear to serve the correct assets, though comes with a likely unrelated issue: