php - 捆绑包的 Symfony 3 资产安装输出文件夹名称
问题描述
有没有办法定义将为symfony/src/mybundle/Resources/public
目录内容生成的输出文件夹名称?
现在它会自动生成web/bundles/
mybundlename/css
文件夹,但我需要有
web/bundles/
custome_name/css
PS:我在谷歌搜索没有发现任何关于这个的......
解决方案
如果您使用 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')