Using NPM Package in Ember

18 Mar

Today I had to use the ‘xml2js‘ package in order support some legacy soap api

I thought npm install –save xml2js and import xml2js from ‘xml2js’ will just work but I was wrong. so after a short googling, I found the following solution:

npm install ember-browserify –save-dev
npm install xml2js –save-dev
import xml2js from ‘npm:xml2js’;

browserify is a tool to allow us to use node modules in our frontend code.

Thanks Timm from Stackoverflow


Leave a Reply

Your email address will not be published. Required fields are marked *