Skip to content

Commit be395f3

Browse files
committed
always compile per entry
1 parent 53d2dec commit be395f3

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* (improvement) Bump required node version to 12.
3333
* (internal) Bumped all dependencies.
3434
* (improvement) Allow `++` in JS/TS code.
35-
* (feature) Enable separate compiler instances for each entry file by using `enablePerEntryCompilation()`
35+
* (improvement) The code is now always compiled per entry file
3636

3737

3838
8.1.0

src/Kaba.ts

-41
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export class Kaba
5252
private javaScriptDependenciesFileName: string = "_dependencies";
5353
private hashFileNames: boolean = true;
5454
private buildModern: boolean = true;
55-
private hasPerEntryCompilation: boolean = false;
5655
private nodeSettings: webpack.Node|false = false;
5756

5857

@@ -227,16 +226,6 @@ export class Kaba
227226
}
228227

229228

230-
/**
231-
* Disables the per entry file compilation.
232-
*/
233-
public enablePerEntryCompilation (): this
234-
{
235-
this.hasPerEntryCompilation = true;
236-
return this;
237-
}
238-
239-
240229
/**
241230
* Setting for polyfilling core node packages
242231
*/
@@ -521,36 +510,6 @@ export class Kaba
521510
],
522511
};
523512

524-
if (!this.hasPerEntryCompilation) {
525-
let config = Object.assign({}, configTemplate, {
526-
entry: {
527-
entry: entries,
528-
},
529-
}) as Partial<webpack.Configuration>;
530-
531-
if (!isModule && undefined !== config.module)
532-
{
533-
config.module.rules.push({
534-
// ESLint
535-
test: /\.m?jsx?$/,
536-
// only lint files that are in the project dir & exclude tests, vendor and node_modules
537-
include: (path) => path.startsWith(this.cwd) && !/node_modules|tests|vendor/.test(path),
538-
loader: "eslint-loader",
539-
options: {
540-
cache: true,
541-
configFile: path.join(this.libRoot, "configs/.eslintrc.yml"),
542-
fix: cliConfig.fix,
543-
parser: "babel-eslint",
544-
quiet: !cliConfig.lint,
545-
// always only emit a warning, so to actually never fail the webpack build
546-
emitWarning: true,
547-
},
548-
})
549-
}
550-
551-
return [config]
552-
}
553-
554513
return Object.keys(entries).map(entryFile =>
555514
{
556515
let config = Object.assign({}, configTemplate, {

0 commit comments

Comments
 (0)