R
R
Rimidbit2018-12-26 19:42:45
JavaScript
Rimidbit, 2018-12-26 19:42:45

Why did the slider stop working when adding a js file to the assembly?

Good time of the day!
I'm doing a tutorial project in a storm, the end result of which is assembled using an assembly. all libraries and dependencies are installed. I figured out the slick-carousel connection, started making a drop-down menu in the header, created the head.js file, added this line to main.js, as a result, the slider broke, and in the console you can see
import 'head.js'
the "file not found" error with your own eyes here https://rimidbit .github.io/shopia-S/ sources here https://github.com/rimidbit/source_code.git I don't know what else to add. I am ready to provide all the input, just to understand

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Marat Garifullin, 2018-12-26
@Rimidbit

Try this AND add to the end of the head.js file
export { openMenu }

G
grinat, 2018-12-26
@grinat

Do require('path to the file')
In order for import 'head.js' to work there, you need to export default (function() {
tuta code
})()
But you don't need to do this, do as magarif wrote

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question