G
G
grabbee2018-06-30 20:59:05
webpack
grabbee, 2018-06-30 20:59:05

How to add a link to a file in html code using webpack or JS?

The site is written in vue as open source and all its components are available on github. I would like to add a link to a file (at least relative or just a file name) to the HTML code of each component, but not hardcode. In webpack, constants like __filename seem to be available - how can you print file names or a path like this, for example, in a comment

<template>
  <div>
    <!-- /translation-gang/ru.vuejs.org -->
    <!-- https://github.com/translation-gang/ru.vuejs.org -->

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question