Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): add index files to bundles (#223)
This allows more visually appealing imports when used with bundlers: ```typescript // Old, but still works: import * as vis from "vis-network/standalone/esm/vis-network"; // New, achieving the same result (ESM): import * as vis from "vis-network/standalone"; // ESM explicitly: import * as vis from "vis-network/standalone/esm"; // UMD explicitly: import * as vis from "vis-network/standalone/umd"; ``` This partially works in HTML but the old way is preferred (less requests, library name in dev tools and better compatibility): ```html <!-- Old, still works. Recommended. --> <script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js" ></script> <!-- New, works but has issues. Not recommended. --> <script type="module" src="https://unpkg.com/vis-network/standalone/esm" ></script> <!-- New, doesn't work. --> <script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd" ></script> ```
- Loading branch information