computmaxer / karma-jspm

Other
74 stars 50 forks source link

Unable to import JSON files #57

Closed ghost closed 8 years ago

ghost commented 9 years ago

In my JSPM project I'm using the JSON plugin 'systemjs/plugin-json' to allow me to import JSON files into my scripts.

It seems that this isn't working with karma-jspm. I'm unsure of what I need to do to get these files loading. SystemJS under Karma is acting as if the plugin isn't loaded at all, appending .js to the end of the filenames.

moog16 commented 8 years ago

I'm also having this issue. I tried doing things like systemjs/plugin-json.json, systemjs/plugin-json.json!, systemjs/plugin-json.json!json, and systemjs/plugin-json.json!text. None worked :(

zyll commented 8 years ago

https://github.com/PacciniBruno/plugin-json/commit/0335cf2d374fc5656d4d0121776656c49f66c19a work for us

otroboe commented 8 years ago

Hello !

I tried so may things, but my json file always win a .js extension at the end :( Do you have any exemple of Karma config and SystemJS config ?

Thank you !

Edit: I found the solution, I add my json file to serveFiles and path configuration.