flaviait / ng2-jspm-template

A template for a quick development workflow with angular 2 and jspm
MIT License
14 stars 3 forks source link

Get rollup-optimization to work #43

Open svi3c opened 8 years ago

svi3c commented 8 years ago

At the moment rollup optimization does not do any tree shaking in this template. As mentioned in https://github.com/frankwallis/plugin-typescript/issues/159, rollup optimization with plugin-typescript should work now.

DorianGrey commented 8 years ago

It seems we will have to update plugin-typescript to the most recent version (5.2.7 atm.). However, this causes a curious error as described here: https://github.com/frankwallis/plugin-typescript/issues/171 .

DorianGrey commented 8 years ago

The linked issue got resolved (version bump is in master), however, using the

{
  // ...
  module: "es2015",
  target: "es5"
  // ...
}

trick results in a somewhat curious error:

err  Error: A module cannot import itself (npm:@types/lodash@4.14.37/index.d.ts!github:frankwallis/plugin-typescript@5.2.9/plugin.js)
    at /home/linne/Projects/ng2-jspm-template/node_modules/rollup/dist/rollup.js:8915:13
DorianGrey commented 8 years ago

The descriptions in https://github.com/frankwallis/plugin-typescript/issues/97 might help as well.