Reputation: 2671
I'm trying to use Riot 3.0.0 with jspm. I installed riot via jspm install riot
. I can't manage to import and use riot. Here is my minimal test:
/app.js
import riot from 'riot';
riot.tag('test',
`<h3>Lalalalala test 1-2-3</h3>`,
function(opts) {}
);
var mountedTags = riot.mount('*');
In browser I get:
(SystemJS) riot is undefined
In jspm_error log:
MultipleErrors: /Users/user/.jspm/packages/npm/[email protected]/lib/browser/common/util/check.js:1:1: Unexpected reserved word import /Users/user/.jspm/packages/npm/[email protected]/lib/browser/common/util/check.js:1:8: Semi-colon expected
In browser I can confirm http://127.0.0.1:8000/static/assets/js/jspm_packages/npm/[email protected]/riot.js is loaded.
Any idea what am I doing wrong?
When riot.min.js (3.0.0) is included in a separate tag from CDN instead of importing, then it works.
Upvotes: 0
Views: 118
Reputation: 2671
For anyone else having a similar problem, I just find out about issue #2028 on riot's github, you might want to follow that too.
Upvotes: 0