I am starting a new project in an environment with built-in CommonJS support for modules require- this is a project with an atomic shell, there is no way to use pre-compilation steps, such as in Browserify or webpack AFAIK.
I can use JSX in my app.jsxentry point file declared on mine index.htmlbecause it JSXTransformerwas declared earlier:
<script src="scripts/vendor/JSXTransformer.js"></script>
<script type="text/jsx" src="scripts/app.jsx"></script>
I want to use JSX syntax for helper modules that are imported as CommonJS modules inside my module app.jsx:
var Grid = require('./scripts/grid.jsx');
As far as I understand, I would have to abandon the JSX syntax and go with the vanilla syntax for any module that loads through require. Are there alternatives to using JSX in this situation?
source
share