├── .idea
├── .name
├── debugging-webpack.iml
├── misc.xml
├── modules.xml
├── runConfigurations
│ └── index_html.xml
└── vcs.xml
├── build
├── bundle.js
└── bundle.js.map
├── greeting.js
├── index.html
├── main.js
└── webpack.config.js
/.idea/.name:
--------------------------------------------------------------------------------
1 | debugging-webpack
--------------------------------------------------------------------------------
/.idea/debugging-webpack.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | CoffeeScript
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/index_html.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/build/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 | /******/
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 | /******/
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ function(module, exports, __webpack_require__) {
46 |
47 | var greeting = __webpack_require__(1);
48 |
49 | (function () {
50 | var welcomeBtn = document.getElementById("welcomeBtn");
51 | var welcomeMsg = document.getElementById("welcomeMsg");
52 |
53 | welcomeBtn.addEventListener('click', function(){ greeting(welcomeMsg)});
54 | })();
55 |
56 |
57 | /***/ },
58 | /* 1 */
59 | /***/ function(module, exports) {
60 |
61 | function addGreeting (a) {
62 | a.innerHTML = "Welcome to WebStorm";
63 | }
64 |
65 | module.exports = addGreeting;
66 |
67 | /***/ }
68 | /******/ ]);
69 | //# sourceMappingURL=bundle.js.map
--------------------------------------------------------------------------------
/build/bundle.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///webpack/bootstrap 708e6a215d0abe832456","webpack:///./main.js","webpack:///./greeting.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAEA;AACA;AACA;;AAEA,sDAAqD,sBAAsB;AAC3E,EAAC;;;;;;;ACPD;AACA;AACA;;AAEA,8B","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 708e6a215d0abe832456\n **/","var greeting = require(\"./greeting.js\");\n\n(function () {\n var welcomeBtn = document.getElementById(\"welcomeBtn\");\n var welcomeMsg = document.getElementById(\"welcomeMsg\");\n\n welcomeBtn.addEventListener('click', function(){ greeting(welcomeMsg)});\n})();\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./main.js\n ** module id = 0\n ** module chunks = 0\n **/","function addGreeting (a) {\n a.innerHTML = \"Welcome to WebStorm\";\n}\n\nmodule.exports = addGreeting;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./greeting.js\n ** module id = 1\n ** module chunks = 0\n **/"],"sourceRoot":""}
--------------------------------------------------------------------------------
/greeting.js:
--------------------------------------------------------------------------------
1 | function addGreeting (a) {
2 | a.innerHTML = "Welcome to WebStorm";
3 | }
4 |
5 | module.exports = addGreeting;
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Hello Webpack!
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | var greeting = require("./greeting.js");
2 |
3 | (function () {
4 | var welcomeBtn = document.getElementById("welcomeBtn");
5 | var welcomeMsg = document.getElementById("welcomeMsg");
6 |
7 | welcomeBtn.addEventListener('click', function(){ greeting(welcomeMsg)});
8 | })();
9 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: "./main.js",
3 | output: {
4 | path: __dirname + "/build",
5 | filename: "bundle.js"
6 | },
7 | devtool: "source-map"
8 | };
--------------------------------------------------------------------------------