Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
2cbb64dede |
1 changed files with 12 additions and 14 deletions
|
@ -1,21 +1,19 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symfony\Config\FrameworkConfig;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'asset_mapper' => [
|
||||
'paths' => [
|
||||
'assets/',
|
||||
],
|
||||
'missing_import_mode' => 'strict',
|
||||
],
|
||||
]);
|
||||
return static function (
|
||||
ContainerConfigurator $containerConfigurator,
|
||||
FrameworkConfig $frameworkConfig,
|
||||
): void {
|
||||
$frameworkConfig->assetMapper()
|
||||
->path('assets/', true)
|
||||
->missingImportMode('strict')
|
||||
->importmapPolyfill(false)
|
||||
;
|
||||
if ($containerConfigurator->env() === 'prod') {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'asset_mapper' => [
|
||||
'missing_import_mode' => 'warn',
|
||||
],
|
||||
]);
|
||||
$frameworkConfig->assetMapper()
|
||||
->missingImportMode('warn');
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue