I wrote an ES6 module that looks something like this:
export default function({makeCurrentVerUrl, verUrl, fileServer, downloadTokenType, appId}) {
...
}
When compiling with webpack, it looks something like this:
webpackJsonp([5,7],[
function(module, exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (_ref) {
var makeCurrentVerUrl = _ref.makeCurrentVerUrl;
var verUrl = _ref.verUrl;
var fileServer = _ref.fileServer;
var downloadTokenType = _ref.downloadTokenType;
var appId = _ref.appId;
...
};
}
]);
This is great, but I'm not sure how to run this file and call the default function.
I can turn it on
<script src="/path/to/script.js"></script>
Most likely, I started it automatically, but how can I name the functions that I defined in it from the browser? requirenot defined in my browser.
source
share