Created
January 14, 2017 20:14
-
-
Save everett1992/f5aa2a82641e220baf74923c962ef102 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| export function foo () { | |
| return 'foo'; | |
| } | |
| export function bar () { | |
| return 'bar'; | |
| } |
This file contains hidden or 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 {foo} from './foo'; | |
| console.log(foo()); |
This file contains hidden or 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
| // Built with webpack -d | |
| /* 0 */ | |
| /* exports provided: foo, bar */ | |
| /* exports used: foo */ | |
| /*!********************!*\ | |
| !*** ./src/foo.js ***! | |
| \********************/ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| eval("/* harmony export (immutable) */ exports[\"a\"] = foo;\n/* unused harmony export bar */\nfunction foo () {\n return 'foo';\n}\n\nfunction bar () {\n return 'bar';\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9mb28uanM/ZjE5ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZm9vICgpIHtcbiAgICByZXR1cm4gJ2Zvbyc7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBiYXIgKCkge1xuICAgIHJldHVybiAnYmFyJztcbn1cblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2Zvby5qc1xuLy8gbW9kdWxlIGlkID0gMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0="); | |
| /***/ }), | |
| /* 1 */ | |
| /* unknown exports provided */ | |
| /* all exports used */ | |
| /*!**********************!*\ | |
| !*** ./src/index.js ***! | |
| \**********************/ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| eval("Object.defineProperty(exports, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foo__ = __webpack_require__(/*! ./foo */ 0);\n\n\nconsole.log(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__foo__[\"a\" /* foo */])());\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9pbmRleC5qcz85NTUyIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Zm9vfSBmcm9tICcuL2Zvbyc7XG5cbmNvbnNvbGUubG9nKGZvbygpKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0="); | |
| /***/ }) | |
| /******/ ]); |
This file contains hidden or 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
| // Omiting webpack preamble | |
| /******/ ([ | |
| /* 0 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| /* harmony export (immutable) */ exports["a"] = foo; | |
| /* unused harmony export bar */ | |
| function foo () { | |
| return 'foo'; | |
| } | |
| function bar () { | |
| return 'bar'; | |
| } | |
| /***/ }), | |
| /* 1 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foo__ = __webpack_require__(0); | |
| console.log(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__foo__["a" /* foo */])()); | |
| /***/ }) | |
| /******/ ]); |
This file contains hidden or 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
| { | |
| "name": "webpack-example", | |
| "version": "0.0.0", | |
| "scripts": { | |
| "build": "webpack", | |
| "build-prod": "webpack -p", | |
| "build-dev": "webpack -d" | |
| }, | |
| "devDependencies": { | |
| "webpack": "^2.2.0-rc.4" | |
| } | |
| } |
This file contains hidden or 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
| 'use strict' | |
| var path = require('path'); | |
| module.exports = { | |
| cache: true, | |
| entry: { | |
| main: './index.js', | |
| }, | |
| output: { | |
| path: path.resolve(__dirname, './lib/'), | |
| filename: '[name].js', | |
| }, | |
| plugins: [ ], | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment