Javelin ECS can be installed via
npm i @javelin/ecs
The following builds are published to NPM:
module field points to the ESM build, which will be automatically discovered by tools like Webpack, Rollup, and Node >=13.2.0.
import * as ECS from "@javelin/ecs"
You can of course also import the ES module directly in browsers that support ECMAScript modules.
<script type="module" src="node_modules/@javelin/ecs/dist/esm/index.js"></script>
main field points to the CommonJS build, which will be included automatically when loaded with
const ECS = require("@javelin/ecs")