Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing scripts into Iles #272

Closed
2 tasks
R0N1n-dev opened this issue Mar 19, 2024 · 3 comments
Closed
2 tasks

Importing scripts into Iles #272

R0N1n-dev opened this issue Mar 19, 2024 · 3 comments

Comments

@R0N1n-dev
Copy link

Description 馃摉

Cannot get script through cdn
Have been having an issue trying to intergrate Vue Ui libraries especially the ones which contain JS (like Vuesax-alpha, Inkline, WaveuI) into iles.
Using cdn, css comes through but the scripts don't

Reproduction 馃悶

https://stackblitz.com/github/R0N1n-dev/iles-pwa

Dependencies Info

Run npx iles info and pnpm list (or npm list) and provide the output:

iles v0.9.5 vite v4.4.4

Logs 馃摐

If not providing a reproduction:

Output

Run DEBUG=iles:* npm run dev or DEBUG=iles:* npm run build and provide the output:


Screenshot from 2024-03-19 16-27-26

The 'Button' should look like this
Screenshot from 2024-03-19 16-27-56

@TechAkayy
Copy link

Hi there,

I tried using inkline on a normal Vue project on stackblitz, and I'm seeing some odd errors with their cdn js script. And I tried in your iles repo as well, same error. This looks like an issue with Inkline rather than with Vue/Iles. Best to raise this bug with them.

Also, their documentation does cover using inkline as a Vite plugin, so that the components can be auto-imported and tree-shaken. Any reason why you are using that way? Iles uses Vite underneath, any Vite plugins can be added to iles.config.ts under a vite property (https://iles.pages.dev/config#configuring-vite)

https://stackblitz.com/edit/vitejs-vite-fpykgf?file=index.html

image

@TechAkayy
Copy link

Also in your reproduction, if you check console, you will notice that the inkline cdn script & css are added the head as expected. So, extending the head via app.js is working the Iles way. If you check the console, you will notice the same error as above in your iles repo too.

Also, I believe when you use cdn, you will have to stick to kebabcase for components. But, I would recommend you to configure inkline the Vite way as per their docs.

image

@R0N1n-dev
Copy link
Author

Alright. Thanx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants