i wrote 3 modules ( Model, View, Controller ) with pure JS syntax. I mean like that:
var Model = (function () {
//...
})();
var View = (function () {
//...
})();
var Controller = (function (model, view) {
//do the job...
})(Model, View);
how can i simulate imports/exports using JS (ES5.1)? I just want to divide code into separated files using only JS.
I tried to transpile ES6 imports via babel and it created someting with like:
var model = require('model');
but when i add that to my code i got error that "require is not allowed"
//* I dont want to use babel in projects