assetmapper
This commit is contained in:
parent
89c54af921
commit
caeb663251
23 changed files with 982 additions and 175 deletions
|
@ -1,32 +1,11 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
|
||||
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
|
||||
use Symfony\Bundle\MakerBundle\MakerBundle;
|
||||
use Symfony\Bundle\WebProfilerBundle\WebProfilerBundle;
|
||||
|
||||
return [
|
||||
FrameworkBundle::class => [
|
||||
'all' => true,
|
||||
],
|
||||
TwigBundle::class => [
|
||||
'all' => true,
|
||||
],
|
||||
DoctrineBundle::class => [
|
||||
'all' => true,
|
||||
],
|
||||
DoctrineMigrationsBundle::class => [
|
||||
'all' => true,
|
||||
],
|
||||
MakerBundle::class => [
|
||||
'dev' => true,
|
||||
],
|
||||
WebProfilerBundle::class => [
|
||||
'dev' => true,
|
||||
'test' => true,
|
||||
],
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
|
||||
];
|
||||
|
|
23
config/packages/asset_mapper.php
Normal file
23
config/packages/asset_mapper.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'asset_mapper' => [
|
||||
'paths' => [
|
||||
'assets/',
|
||||
],
|
||||
'missing_import_mode' => 'strict',
|
||||
],
|
||||
]);
|
||||
if ($containerConfigurator->env() === 'prod') {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'asset_mapper' => [
|
||||
'missing_import_mode' => 'warn',
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue