首页 > 解决方案 > 捆绑包的 Symfony 3 资产安装输出文件夹名称

问题描述

有没有办法定义将为symfony/src/mybundle/Resources/public目录内容生成的输出文件夹名称?

现在它会自动生成web/bundles/mybundlename/css文件夹,但我需要有 web/bundles/custome_name/css

PS:我在谷歌搜索没有发现任何关于这个的......

标签: phpsymfonyassets

解决方案


如果您使用 Webpack 和 Encore 作为文档推荐,您可以在

Encore
// directory where compiled assets will be stored
.setOutputPath('web/bundles/yourcustomname/')
// public path used by the web server to access the output path
.setPublicPath('/yourcustomname')

推荐阅读