riot-starter/docs/modules.md

12 lines
671 B
Markdown

# Module System
ES6 Modules just dont work *well* inside `RiotJS` tags (`<=3`), you could include them at the top of the page, but that requries a build-*watch*-proccess that goes against -- a **zero-build** develop process!
**Mixins** is Riots answer to shared / resultable componet logic, but you want an easy way to compose larger bits of logic before they were injected into `riot.mixin`, that is why the build process (gulp) treats javascript files differently.
While using ES Modules for application logic, tags need to be built separately.
- Tags are build with Riot, and minified
- Application JS is built with Rollup, and minified (iife format)