I have following structure (redacted):
workspace
|- thegame
|- node_modules
| package.json
| bs-config.json
|- src
| tsconfig.json
|- app
| game.model.ts (<-- here I would like to import game-engine)
|- game-engine
|- dist (after the local build)
| package.json
| tsconfig.json
|- lib
| index.ts (the actual engine module)
I run the application (Angular2) in the "thegame" path with "npm start".
What should I add to the thegame/src/tsconfig.json so that I could do following in the game.model.ts?
import { Engine } from 'game-engine';
I have tried to symlink the "game-engine" to "thegame/node_modules" but when I run the project with lightserve it gives "404 GET /game-engine"
I want to develop the engine separated from the web application. I am also interested in any other hints how to achieve this.
The project is based on Angular 2 Quickstart at https://github.com/angular/quickstart
cd workspace\thegame->npm install ../game-enginetscis not a loader it is the TypeScript compiler's command line interface. Based on the link, your loader is SystemJS, an excellent module loader."game-engine": "npm:game-engine/dist/index.js"in the"map"configuration