add scripts
keeslina opened this issue · 1 comments
Hi,
How can i add my own scripts? For instance, i'm trying to add 'flickity'(https://flickity.metafizzy.co/).
I've tried to run 'yarn add flickity' which add flickity to the node_modules directory in my theme folder.
After that added this line in my tailwind.config.js file:
plugins: [
tailpress.tailwind,
require('flickity'),
]
But this gives a whole lot of errors when running 'yarn watch'.
Another this i tried is downloading flickity.pkgd.js and placing it in the /resources/js folder.
After this, i've added $('selector').flickity(). to my app.js file.
Both ways, i get a console error :
Uncaught ReferenceError: Flickity is not defined
at Object../resources/js/app.js
I know this is some basic setup problem, but can you help me out any way?
You can import flickity within your resources/js/app.js
file. It is not meant to be included within your tailwind config file.
import flickity from 'flickity';