A
A
Artyom2020-06-27 11:18:17
JavaScript
Artyom, 2020-06-27 11:18:17

How to import a js script so that it is executed?

I am writing a project, it is built through webpack, but it needs jquery, if it is connected to the html file, then everything works, but during build, such scripts connected to the html file are not transferred anywhere. And if I import jquery into the js file (which is the entry point), then jquery is not executed, therefore nothing works, and how to connect, for example, jquery to my file, so that it is executed (if possible), and if not, are there others ways to solve this problem, maybe a webpack plugin or something else?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2020-06-27
@Robur

you can use https://webpack.js.org/plugins/copy-webpack-plugin/ to copy jquery to where you need it
or read this there a few ways in intelligibly progcode.ru/2019/01/12/%D0%B8% D1%81%D0%BF%D0%BE%D0...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question