riot-js

Open full view…

tag component as npm module, riot is not defined

kemch
Thu, 26 Jan 2017 18:20:27 GMT

I'm trying to include a riot tag as an npm module and am having an issue with riot itself not being in scope of the module. For the module, I'm converting the .tag file to a .js file using the riot-cli. The .js file is then used as the module's main file. When adding it to my riot project, I get `error riot is not defined`, which I believe to be because riot is not globally defined in our app. My question is how can I have the riot module use riot as it is defined in the app, (without globally defining it)? I am using `require()` for both riot and the module.

alejandrocolina
Wed, 15 Mar 2017 12:43:57 GMT

Did you ever get an answer to this?