Skip to content

Instantly share code, notes, and snippets.

@Couto
Last active February 15, 2016 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Couto/6c6164c24ae031bff935 to your computer and use it in GitHub Desktop.
Save Couto/6c6164c24ae031bff935 to your computer and use it in GitHub Desktop.
const nameBuilder = function (firstName = "John", lastName = "Doe") {
console.log(firstName + " " + lastName);
};
nameBuilder();
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {
"use strict";
var nameBuilder = function nameBuilder() {
var firstName = arguments.length <= 0 || arguments[0] === undefined ? "John" : arguments[0];
var lastName = arguments.length <= 1 || arguments[1] === undefined ? "Doe" : arguments[1];
console.log(firstName + " " + lastName);
};
nameBuilder();
/***/ }
/******/ ]);
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack --config webpack.config.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.5.2",
"babel-loader": "^6.2.2",
"babel-preset-es2015": "^6.5.0",
"webpack": "^1.12.13"
}
}
module.exports = {
entry: './input.js',
output: {
filename: 'output.js'
},
module: {
loaders: [
{
test: /\.js?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015']
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment