A
A
agentDonskoy2018-06-07 16:56:32
HTML
agentDonskoy, 2018-06-07 16:56:32

How to include js in HTML if installed via NPM?

Hello.
I installed the "utf8" package. It was copied to the folder: node_modules/utf8/utf8.js
Now in index.html I write: - of course, that it is not visible.
How do I make it so I can reach utf8.js - but without writing node_modules/utf8/utf8.js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zhivagin, 2018-06-07
@agentDonskoy

Usually NPM modules are used together with the assembler - Gulp, webpack.
If there is no collector, you can simply connect<script src="../node_modules/utf8/utf8.js" />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question