undefined variable that equals to a node module
undefined variable that equals to a node module I try to transpire my file using browserify or webpack. This is my code: let rangy = require('rangy') rangy.init() const rang = () => rangy After transpire my code and add in a html page, I try to get rangy in console, but when i type rangy and press enter button, js says: rangy Uncaught ReferenceError: rangy is not defined When i type rang() and press enter, js says: rang() undefined But line 2 runs correctly. I need to use rangy in script tag of my index.html . rangy index.html How can I do this? This is my transpired file: (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n...
