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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using in simple HTML page #15

Open
Ciao121 opened this issue Mar 20, 2024 · 1 comment
Open

Using in simple HTML page #15

Ciao121 opened this issue Mar 20, 2024 · 1 comment

Comments

@Ciao121
Copy link

Ciao121 commented Mar 20, 2024

Hi,
I find no way to use it in a simpe html page (index.html)... no React, vo Vues. That's because my very low experience with es modules and how to use them in a browser.
Is there any example I can find somewhere?
Thank you!!!

@Ciao121
Copy link
Author

Ciao121 commented Mar 20, 2024

This is my attempt:
<script type="module"> import { rs } from './node_modules/text-readability/main.js' </script>
main.js is loaded with http 200 code but I get:
Uncaught TypeError: Failed to resolve module specifier "syllable". Relative references must start with either "/", "./", or "../".
I can change in main.js:
import { syllable } from 'syllable';
to
import { syllable } from './node_modules/syllable/index.js'
but then I get another one.. and another one..

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

1 participant