htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
Other
4.9k stars 309 forks source link

3rd-party plugins not working with Laravel as per docs #456

Closed zaxwebs closed 2 months ago

zaxwebs commented 2 months ago

Summary

Not able to use components like Charts in Laravel

Steps to Reproduce

  1. Implement 3rd-party Preline components like Chart as in Docs

Demo Link

https://preline.co/docs/charts.html

Expected Behavior

The docs should cover usage of such plugins/components for frameworks like Laravel

Actual Behavior

No response

Screenshots

No response

jahaganiev commented 2 months ago

You may learn more about Charts here

zaxwebs commented 2 months ago

Thanks. Seems like when using it with Preline and integrating it as per docs. It doesn't work, not in Laravel. The script tag won't load as documented in the Preline docs.

jahaganiev commented 2 months ago

Could you please provide more details so others can reproduce the issue? Thanks!

zaxwebs commented 2 months ago

Sure, the docs state adding styles like <link rel="stylesheet" href="./node_modules/apexcharts/dist/apexcharts.css"> and scripts like <script src="./node_modules/apexcharts/dist/apexcharts.min.js"></script> but this does not work in Laravel. Preline framework docs also do not cover how to get components like Charts working.

E.g when trying when trying to implement File Upload, the docs are potentially missing a step or gotcha on making this work with Frameworks like Laravel as adding <script src="./node_modules/lodash/lodash.min.js"></script> & <script src="./node_modules/dropzone/dist/dropzone-min.js"></script> will do nothing, configuring or importing the same via app.js doesn't help as HS expects Dropzone to be initialized (how to and where?). Maybe some hint on how to get this setup in the docs would be nice.

PS: This maybe niche but thanks for going through it.