How to Browserify-Shim Angular 2?

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to Browserify-Shim Angular 2?



Anyone know how to Browserify-Shim Angular 2, while keeping Angular external and not bundling it in the build?


//package.json

"name": "testapp",
"version": "1.0.0",
"main": "./app.js",
"browserify-shim":
"angular2": "global:angular2"
,
"browserify":
"transform": [ "browserify-shim" ]
,
"dependencies":
"browserify-shim": "~3.2.0"




...


//app.ts
import Component, View, bootstrap, NgFor from 'angular2';



Result:


TypeError: angular2_1 is undefined





i guess you should add another transform named "tsify" to compile ts file.
– sertaconay
Jan 4 '16 at 12:58









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Hb1m1k,Kwl GNjk ZU,eWYit4UYRi17YUrbL6jAHU,I6tt0ADfngTsL 7k63u7mFn6R8DLoKhW3
gUVfFmz Cu,3JBzW,TAMJ8PNvId 4eZLXq0ccA0t,c,n0Q2Y w,tMn7UaVnNkiKbehyovlyv5VtZ7no,K4KBE0DVhxv2Uv

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3