Reputation: 97
I can't see to import js files with laravel-mix in the build process. I get module not found errors for every file I am importing into my main.js file.
I have a folder structure like
src
--resources
----js
------main.js
----views
------blocks
--------slider
-----------slider.js
In my main js file I import like the following
import slider from '../veiws/blocks/slider/slider.js';
My laravel mix file looks like this.
mix.js('src/resources/js/main.js', 'src/public/js')
What else do I need to make this work.
Upvotes: 0
Views: 858
Reputation: 97
Nothing to see here guys/gals. This works correctly if you don't have a typo like me.
Upvotes: 2