Last piece needed for working with Sitelets using module-based JS. For local debug mode, for readability and quick iteration, it would be best if one-file-per-class readable .js files are used. However, browsers can't handle npm package imports as is, because it's underdefined (the packages-lock.json file and the node_modules folder are not accessible through the localhost server).
We need to provide either an import map or an integration for a localhost prebundler like Vite.
Last piece needed for working with Sitelets using module-based JS. For local debug mode, for readability and quick iteration, it would be best if one-file-per-class readable .js files are used. However, browsers can't handle npm package imports as is, because it's underdefined (the
packages-lock.json
file and thenode_modules
folder are not accessible through the localhost server).We need to provide either an import map or an integration for a localhost prebundler like Vite.