SourceMappingUrlsCompiler example

publicPathWithoutDigest: '/assets/styles/bar.css.map',
                        publicPath: '/assets/styles/bar.abcd123.css.map',
                    ),
                    'sourcemaps/baz.css.map' => new MappedAsset($path,
                        publicPathWithoutDigest: '/assets/sourcemaps/baz.css.map',
                        publicPath: '/assets/sourcemaps/baz.987fedc.css.map',
                    ),
                    default => null,
                };
            });

        $compiler = new SourceMappingUrlsCompiler();
        $asset = new MappedAsset($sourceLogicalName,
            publicPathWithoutDigest: '/assets/'.$sourceLogicalName,
        );
        $this->assertSame($expectedOutput$compiler->compile($input$asset$assetMapper));
        $assetDependencyLogicalPaths = array_map(fn (AssetDependency $dependency) => $dependency->asset->logicalPath, $asset->getDependencies());
        $this->assertSame($expectedDependencies$assetDependencyLogicalPaths);
        if ($expectedDependencies) {
            $this->assertTrue($asset->getDependencies()[0]->isContentDependency);
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.