Given Node.js app with a CJS requires.
app.js
// Depends on underscore
var _ = require('underscore');
var mult = require('./mult');
var app = {
x: 1,
Given Node.js app with a CJS requires.
app.js
// Depends on underscore
var _ = require('underscore');
var mult = require('./mult');
var app = {
x: 1,
Using react in components is actually quite straightforward. Be aware, that there is no easy way to insert a tag with a hyphen in JSX. So your react component should not contain any custom-elements inside.
my-component.html
<script src="./bower_components/versal/runtime.js"></script>
<script src="./bower_components/react/react.js"></script>
<script src="./dist/my-component.js"></script>