aurelia-i18n with aurelia-cli gives error plugin.l

2019-07-26 11:25发布

has anyone been able to successfully use aurelia-i18n with a project started using aurelia-cli written in TypeScript? I have tried a couple of projects following the instructions in the github project doco, but it comes up with an error in the browser when running it.

vendor-bundle.js:4872 Uncaught TypeError: plugin.load is not a function
at Module.<anonymous> (vendor-bundle.js:4872)
at vendor-bundle.js:3911
at on (vendor-bundle.js:4294)
at Module.callPlugin (vendor-bundle.js:4732)
at Module.fetch (vendor-bundle.js:4601)
at Module.check (vendor-bundle.js:4633)
at Module.enable (vendor-bundle.js:4953)
at Module.<anonymous> (vendor-bundle.js:4776)
at vendor-bundle.js:3911
at vendor-bundle.js:4966
at each (vendor-bundle.js:3836)
at Module.emit (vendor-bundle.js:4965)
at Module.check (vendor-bundle.js:4715)
at Module.enable (vendor-bundle.js:4953)
at Object.enable (vendor-bundle.js:5334)
at Module.callPlugin (vendor-bundle.js:4875)

It seems to be related to loading the Backend, because if I comment that out I don't get the error (translation obviously doesn't work either)

I have tried both backends mentioned in the docs

Here is my sample app code: https://github.com/gregbacchus/aurelia-i18n-sample

I'd greatly appreciate someone taking a look and telling me what I'm doing wrong. Thanks

1条回答
Viruses.
2楼-- · 2019-07-26 11:51

Thanks to @zewa666 for the help on gitter. It seems that altering aurelia_project/aurelia.json to set build.loader.plugins.stub to false fixed my problem.

查看更多
登录 后发表回答