我想复制由Vue.js生成的dist文件夹并在symfony路径上提供它,我试过了:
routes.yaml
vue:
path: /{path}
controller: App\Controller\ApiController::vue
methods: [GET]
requirements:
path: .*
ApiController.php
public function vue()
{
$vuepath = __DIR__.'/../../public/dist/index.html';
return new Response(file_get_contents($vuepath));
}
它启动index.html
不会加载javascript文件。我该如何提供我的申请?