shaack / cm-web-modules

Collection of clean and small ES6 modules for the web
MIT License
2 stars 0 forks source link

Add to CDN #1

Open gorod0k opened 1 month ago

gorod0k commented 1 month ago

Hello, shaack! I admire of your work!

Now I'm looking for ways to deploy your project on an Android phone. Cm-chessboard was deployed well. But chess-console..

Hardlinks are prohibited by SELinux policy. Nothing can be done with this, just Android's limitations.

So, I think this way is not working for my termux node environment: <script type="importmap"> { "imports": { "cm-chessboard/": "../node_modules/cm-chessboard/", "cm-web-modules/": "../node_modules/cm-web-modules/", "chess.mjs/": "../node_modules/chess.mjs/", "cm-pgn/": "../node_modules/cm-pgn/", "cm-chess/": "../node_modules/cm-chess/" } } </script>

Is it the way to load this modules from export NODE_PATH=~/../usr/lib/node_modules Or at least add cm-web-modules to CDN? Or may be something else.. Thank you! With the best regards!

shaack commented 1 week ago

Hi @gorod0k. Thank you. Good question. Am am lacking experience with Android development. I just can tell, in a web environment, If importmap is not supported, which may be on some older browsers, I successfully use und used https://github.com/guybedford/es-module-shims, which adds a polyfill for "importmap". Does this solve your issue?

If you need just a CDN for cm-web-modules, this exists, with: https://cdn.jsdelivr.net/npm/cm-web-modules@2/...