Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,12 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
var getCompilerOptionDiagnostics = true;

loader._compiler.plugin("after-compile", (compilation, callback) => {
// Don't add errors for child compilations
if (compilation.compiler.isChild()) {
callback();
return;
}

let stats = compilation.stats;

// handle all other errors. The basic approach here to get accurate error
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"escape-string-regexp": "^1.0.3",
"fs-extra": "^0.22.1",
"glob": "^6.0.3",
"html-webpack-plugin": "^2.8.1",
"mkdirp": "^0.5.1",
"mocha": "^2.1.0",
"rimraf": "^2.4.2",
Expand Down
1 change: 1 addition & 0 deletions test/html-webpack-plugin/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("hello");
51 changes: 51 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.6/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/******/ (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) {

console.log("hello");


/***/ }
/******/ ]);
9 changes: 9 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.6/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Webpack App</title>
</head>
<body>
<script src="bundle.js"></script></body>
</html>
12 changes: 12 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.6/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Asset Size Chunks Chunk Names
bundle.js 1.41 kB 0 [emitted] main
index.html 159 bytes [emitted]
chunk {0} bundle.js (main) 22 bytes [rendered]
[0] ./.test/html-webpack-plugin/app.ts 22 bytes {0} [built]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 426 kB 0
chunk {0} index.html 412 kB [rendered]
[0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 356 bytes {0} [built]
[1] ./~/html-webpack-plugin/~/lodash/index.js 411 kB {0} [built]
[2] (webpack)/buildin/module.js 241 bytes {0} [built]
51 changes: 51 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.7/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/******/ (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) {

console.log("hello");


/***/ }
/******/ ]);
9 changes: 9 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.7/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Webpack App</title>
</head>
<body>
<script src="bundle.js"></script></body>
</html>
12 changes: 12 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.7/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Asset Size Chunks Chunk Names
bundle.js 1.41 kB 0 [emitted] main
index.html 159 bytes [emitted]
chunk {0} bundle.js (main) 22 bytes [rendered]
[0] ./.test/html-webpack-plugin/app.ts 22 bytes {0} [built]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 426 kB 0
chunk {0} index.html 412 kB [rendered]
[0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 356 bytes {0} [built]
[1] ./~/html-webpack-plugin/~/lodash/index.js 411 kB {0} [built]
[2] (webpack)/buildin/module.js 241 bytes {0} [built]
51 changes: 51 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.8/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/******/ (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) {

console.log("hello");


/***/ }
/******/ ]);
52 changes: 52 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.8/bundle.transpiled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/******/ (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";
console.log("hello");


/***/ }
/******/ ]);
9 changes: 9 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.8/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Webpack App</title>
</head>
<body>
<script src="bundle.js"></script></body>
</html>
12 changes: 12 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.8/output.transpiled.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Asset Size Chunks Chunk Names
bundle.js 1.43 kB 0 [emitted] main
index.html 159 bytes [emitted]
chunk {0} bundle.js (main) 36 bytes [rendered]
[0] ./.test/html-webpack-plugin/app.ts 36 bytes {0} [built]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 426 kB 0
chunk {0} index.html 412 kB [rendered]
[0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 356 bytes {0} [built]
[1] ./~/html-webpack-plugin/~/lodash/index.js 411 kB {0} [built]
[2] (webpack)/buildin/module.js 241 bytes {0} [built]
12 changes: 12 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.8/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Asset Size Chunks Chunk Names
bundle.js 1.41 kB 0 [emitted] main
index.html 159 bytes [emitted]
chunk {0} bundle.js (main) 22 bytes [rendered]
[0] ./.test/html-webpack-plugin/app.ts 22 bytes {0} [built]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 426 kB 0
chunk {0} index.html 412 kB [rendered]
[0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 356 bytes {0} [built]
[1] ./~/html-webpack-plugin/~/lodash/index.js 411 kB {0} [built]
[2] (webpack)/buildin/module.js 241 bytes {0} [built]
51 changes: 51 additions & 0 deletions test/html-webpack-plugin/expectedOutput-1.9/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/******/ (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) {

console.log("hello");


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