mantrajs / mantra-cli

Command line interface for building Meteor apps with Mantra
MIT License
135 stars 34 forks source link

Updated import paths to be relative to current directory #76

Closed THPubs closed 8 years ago

THPubs commented 8 years ago

In some files, mantra-cli used import paths relative to the root of the project like import * as Collections from '/lib/collections';. Unfortunately, the new Meteor 1.3.3 update breaks these imports as discussed here : https://forums.meteor.com/t/1-3-3-imports-breaking/24890

So, updated all the paths relative to the current directory where the file is in like this : import * as Collections from '../../lib/collections';.

Hope I found all the imports. :-)

sungwoncho commented 8 years ago

I skimmed through the forum discussion. It wasn't clear if this bug was due to a breaking change or a bug in the new version of Meteor. I'll keep an eye out and merge this if latter. Please keep me updated.

THPubs commented 8 years ago

I sure will :-)

THPubs commented 8 years ago

Just updated to 1.3.3.1 and still the problem is there :-(

THPubs commented 8 years ago

I just updated to the latest version of mantra-core and removed babel-root-slash-import from .babelrc and now it is working! Do we need babel-root-slash-import anymore?

sungwoncho commented 8 years ago

npm test might fail without that module but I haven't tested it myself. See https://github.com/meteor/meteor/issues/7225#issuecomment-227355877

THPubs commented 8 years ago

Yep you are right, tests fail without that plugin :-(

sungwoncho commented 8 years ago

@THPubs updating babel-root-slash-import will solve the problem. See here. Can you check?

THPubs commented 8 years ago

Ah yep. Sorry @sungwoncho was a bit busy these days and forgot to check on it :-)

sungwoncho commented 8 years ago

No worries. Thanks for reporting this.

THPubs commented 8 years ago

You welcome :-)