royibernthal Posted May 24, 2017 Share Posted May 24, 2017 I'm trying to create a new TypeScript project around Pixi. I'd like it to be as straightforward and lightweight as possible without any unnecessarily complex configurations, while meeting these requirements: -Using npm -Using TypeScript -Using import statements, e.g. import { Sprite, Texture } from 'pixi.js'; -Bundle all dependencies from node_modules that were imported using import statements into /build for production -Compile project source into a single outFile and put it in /build -Load dependencies at runtime according to imports made using import statements -Using SystemJS, since I understood it's in the process of becoming the standard module loader So far I created a new project: -Used npm - installed pixi.js and its typings for TypeScript -Compiling using tsc (tsconfig.json) via Visual Studio Code -tsconfig.json "module": "system" (SystemJS) -I can write import statements (since module is set to "system") -tsconfig.json "outFile": "../build/app.js" - compiles project source into a single outFile and puts it in "build" dir What I'm missing is: -Bundle all dependencies from node_modules that were imported using import statements into /build for production -Load dependencies at runtime according to imports made using import statements I don't have any experience with setting up and configuring module loaders. Could you please help point me in the right direction? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.