Skip to content

Instantly share code, notes, and snippets.

@naomiajacobs
Last active November 8, 2016 22:00
Show Gist options
  • Save naomiajacobs/a4c371bad2cd8c8fe2b5a20b67b23b90 to your computer and use it in GitHub Desktop.
Save naomiajacobs/a4c371bad2cd8c8fe2b5a20b67b23b90 to your computer and use it in GitHub Desktop.
import math from './math.jsx';
console.log(`I can add 2 and 3! ${math.add(2, 3)}`);
console.log(`I can multiply 2 and 3! ${math.multiply(2, 3)}`);
const math = {
add: (x, y) => { return x + y; },
multiply: (x, y) => { return x * y; },
};
export default math;
var files = [fileA, fileB, fileC];
function(files) {
var cache = {};
function webpackRequire(index) {
var module = {
exports: {},
cached: false,
};
var file = files[index];
file(module, webpackRequire);
return module.exports;
}
var entryFile = files[0];
return webpackRequire(entryFile);
}(files);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment