Make this independent from NPM, webpack and bundlers
I have been trying to build a react development environment with zero NPM and bundler dependency.
So far I was able to use nerv source code with minimal changes. It only needs TypeScript to transpile tsx files to js. The goal is to use browser's ES2015 modules support, at least for development time.
This repo works in Chrome 63: https://github.com/malekpour/nopack
I copied nerv source files in the src/external folder and the only thing I had to change was adding .js extension to import statements.
// import { render } from './render'
import { render } from './render.js'
Ideally we should be able to reference ES2015 libraries from CDN's just like what we used to do for jQuery or Angular 1.
In this case, TypeScript compiler(tsc) is also a bundler to me. IMO, A bundler is inevitable while using JSX.
By bundler I meant some tool to combine all source files to a single package, TypeScript still is a transformer which is not really required. If we write source code in esnext syntax we even do not need to transform them. In order to do that we just need .js extension in import directives.
Take a look at this modified nerve version: https://github.com/malekpour/nopack/blob/master/src/external/nerv/index.ts
The result will be ready to use without being bundled or transformed in development time. Can even be hosted and referenced from a CDN.