Commit 1c53811c authored by Stefan Cameron's avatar Stefan Cameron

Fix build UMD/ESM export to be rtv

parent 67053176
......@@ -12,6 +12,35 @@ This library is isomorphic: It runs equally well in modern browsers and on the s
npm install rtvjs
The package's `/dist` directory contains two types of builds:
* `rtv.umd.js/rtv.umd.min.js`: UMD loader, full and minified.
* `rtv.esm.js/rtv.esm.mind.js`: ES6 Module, full and minified.
## UMD
The UMD build can be used like this:
// as a global, when loaded via a <script> tag in HTML
// as a CommonJS module (e.g. Node.js)
const rtv = require('rtvjs');
// as an AMD module (e.g. RequireJS)
define(['rtvjs'], function(rtv) {
## ESM
The ES6 module build can be used like this:
import rtv from 'rtvjs';
# Documentation
......@@ -71,7 +71,7 @@ const getUmdConfig = function(minified) {
file: `dist/${LIB_NAME}.umd.${minified ? 'min.js' : 'js'}`,
format: 'umd',
name: LIB_NAME,
noConflict: true,
sourcemap: true,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment