Skip to content

Commit

Permalink
add back html-webpack-plugin test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyreilly committed Mar 18, 2018
1 parent 3e33f8f commit 01a8888
Show file tree
Hide file tree
Showing 8 changed files with 279 additions and 161 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"precommit": "lint-staged"
},
"lint-staged": {
"*.{ts,md}": ["prettier --write", "git add"]
"*.{ts,md}": [
"prettier --write",
"git add"
]
},
"repository": {
"type": "git",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
Expand All @@ -59,16 +64,22 @@
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ return __webpack_require__(__webpack_require__.s = "./app.ts");
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
/******/ ({

console.log("hello");
/***/ "./app.ts":
/*!****************!*\
!*** ./app.ts ***!
\****************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("console.log(\"hello\");\n\n\n//# sourceURL=webpack:///./app.ts?");

/***/ })
/******/ ]);

/******/ });
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Built at: 2018-3-18 09:13:32
Asset Size Chunks Chunk Names
bundle.js 2.8 KiB main [emitted] main
index.html 190 bytes [emitted]
Entrypoint main = bundle.js
[./app.ts] 22 bytes {main} [built]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 550 KiB 0
Entrypoint undefined = index.html
[../../node_modules/html-webpack-plugin/lib/loader.js!./index.html] /node_modules/html-webpack-plugin/lib/loader.js!./index.html 509 bytes {0} [built]
[../../node_modules/lodash/lodash.js] /node_modules/lodash/lodash.js 527 KiB {0} [built]
[../../node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {0} [built]
[../../node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Built at: 2018-3-18 09:13:30
Asset Size Chunks Chunk Names
bundle.js 2.5 kB 0 [emitted] main
index.html 182 bytes [emitted]
[0] ./.test/html-webpack-plugin/app.ts 22 bytes {0} [built]
bundle.js 2.8 KiB main [emitted] main
index.html 190 bytes [emitted]
Entrypoint main = bundle.js
[./app.ts] 22 bytes {main} [built]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 544 kB 0
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/html-webpack-plugin/default_index.ejs 538 bytes {0} [built]
[1] ./node_modules/lodash/lodash.js 540 kB {0} [built]
[2] (webpack)/buildin/global.js 488 bytes {0} [built]
[3] (webpack)/buildin/module.js 495 bytes {0} [built]
Asset Size Chunks Chunk Names
index.html 550 KiB 0
Entrypoint undefined = index.html
[../../node_modules/html-webpack-plugin/lib/loader.js!./index.html] /node_modules/html-webpack-plugin/lib/loader.js!./index.html 509 bytes {0} [built]
[../../node_modules/lodash/lodash.js] /node_modules/lodash/lodash.js 527 KiB {0} [built]
[../../node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {0} [built]
[../../node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
2 changes: 1 addition & 1 deletion test/comparison-tests/html-webpack-plugin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<title>Webpack App</title>
</head>
<body>
<script src="bundle.js"></script></body>
</body>
</html>
5 changes: 4 additions & 1 deletion test/comparison-tests/html-webpack-plugin/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ module.exports = {
extensions: ['.ts', '.js']
},
plugins: [
new HtmlWebpackPlugin({})
new HtmlWebpackPlugin({
inject: true,
template: './index.html'
})
],
module: {
rules: [
Expand Down
Loading

0 comments on commit 01a8888

Please sign in to comment.