[Vuejs]-Is there any way to load Vue js Library into Pug template without adding CDN

0👍

we can include a virtual path to the route and then we can access the javascript file as follows.

In Router JS

router.use('/javascript', express.static(path.join(path.dirname(require.main.filename), 'public')));

In Pug Template

script(src='/simple-api/javascript/test.js')

Consider “simple-api” is the public URL.

Leave a comment