substance
Version:
Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing system. It is developed to power our online editing platform [Substance](http://substance.io).
13 lines (12 loc) • 457 B
JavaScript
module.exports = function (_module) {
const path = require('path')
// create the ESM loader first
const _require = require('esm')(_module)
// and let 'module-alias' register on top of the ESM loaded
const moduleAlias = _require('module-alias')
const substanceEntryPoint = path.join(__dirname, '..', 'index.es.js')
moduleAlias.addAlias('substance', substanceEntryPoint)
// register the alias module loaded
moduleAlias()
return _require
}