Last active
November 8, 2016 22:00
-
-
Save naomiajacobs/a4c371bad2cd8c8fe2b5a20b67b23b90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const math = { | |
add: (x, y) => { return x + y; }, | |
multiply: (x, y) => { return x * y; }, | |
}; | |
export default math; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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