jspm / npm

NPM Location Service
19 stars 31 forks source link

Lots of error when installing npm:material-components-web #166

Open andrewharry opened 7 years ago

andrewharry commented 7 years ago

I believe that material-components-web is written in a ES2015 module style which causes lots of issues when I tried to include it in a new jspm / system.js based website.

lots of errors logged in the .jspm-errors files.
"Unexpected reserved word export" "Unexpected reserved word import" etc

andrewharry commented 7 years ago

Do I need to flag these modules as being 'esm' format?

meta: { '@material/*': { format: 'esm' } }

I will try this tonight... maybe this will give system.js the information it needs. I am thinking I need to transpile on the browser while in development but transpile and bundle for production. Does that sound about right?

aluanhaddad commented 7 years ago

It should just work out of the box if you're using transpiler: 'plugin-babel' or transpiler: 'plugin-traceur' or transpiler: 'plugin-typescript', what version of jspm are you using?