Answer the question
In order to leave comments, you need to log in
How to write HTML links in webpack?
I searched for a solution on the Internet, but I could not find anything about it (maybe everything is obvious, but I'm dumb)))
So
I have a folder with site pages
In index.pug there is a link to ui-kit.pug:
+button_gradient('UI-Kit/ui-kit.pug', 'UI-Kit страница 1')
<a class="button_gradient" href="UI-Kit/ui-kit.pug">UI-Kit страница 1</a>
Also .pug is converted to .html, maybe you need it +button_gradient('UI-Kit/ui-kit.html', 'UI-Kit page 1')
Answer the question
In order to leave comments, you need to log in
In general, I still don’t understand whether auto-generated links can be done (well, for example, which are used for pictures or other resources, the path to which the webpack itself edits)
But I just added the name of the folder in the name of the final file, and it correctly created the folder and placed it in its .html file
new HTMLWebpackPlugin({
filename: 'UI-kit/ui-kit.html',
template: './pages/UI-kit/ui-kit.pug'
}),
It's not about webpack, as I understand it. And not understanding how to connect a ui kit?
include UI-Kit/ui-kit.pug
+button_gradient('yandex.ru', 'YANDEX TEXT')
Probably you need it, or maybe not, it's not clear from your description.
Also .pug is converted to .html, maybe you need +button_gradient('UI-Kit/ui-kit .html ', 'UI-Kit page 1') ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question