const Encore = require('@symfony/webpack-encore');
const path = require('path');
Encore
---
.addAliases({
'@': path.resolve( __dirname,
'../../vendor/vankosoft/application/src/Vankosoft/ApplicationBundle/Resources/themes/default/assets' )
})
---
;
const config = Encore.getWebpackConfig();
config.name = 'DeveloperBlog';
module.exports = config;
Generate Routes JSON.
bin/console fos:js-routing:dump --format=json --target=public/shared_assets/js/fos_js_routes_admin.json
Using It.
import { VsPath } from '@/js/includes/fos_js_routes.js';
$( function ()
{
var url = VsPath( 'vsorg_download_directories_update', {'id': 2 } );
});