How to reference files in node_modules in a single page

clipboard.png

problem description

the environmental background of the problems and what methods you have tried

I refer to the file path in node_modules in one.html as the path in the green box, but I will report an error. I can"t find this module. What should I do?

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jan.03,2022

are you running directly in the browser? Require cannot be introduced directly.

you can load

through the script tag.

you need to see which libraries you reference support. Generally, there are Browser , AMD , CMD , Node and so on

.

the way you quote it in the browser, please see Browser

.

such as jquery

https://www.npmjs.com/package.

clipboard.png

Menu