-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improved multi-compiler cache location and validating it
- Loading branch information
Showing
26 changed files
with
264 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-1/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
it("should build", () => {}); |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-1/test.filter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = config => config.cache; |
33 changes: 33 additions & 0 deletions
33
test/configCases/cache-filesystem/multicompiler-mode-cache-1/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"use strict"; | ||
|
||
// default settings. should just work | ||
|
||
/** @type {import("../../../../").Configuration} */ | ||
module.exports = [ | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
type: "filesystem", | ||
name: "name2" | ||
} | ||
}, | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
type: "filesystem", | ||
name: "name1" | ||
} | ||
}, | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: true | ||
}, | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: true | ||
} | ||
]; |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-2/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
it("should build", () => {}); |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-2/test.filter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = config => config.cache; |
29 changes: 29 additions & 0 deletions
29
test/configCases/cache-filesystem/multicompiler-mode-cache-2/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"use strict"; | ||
|
||
// no cache names | ||
|
||
/** @type {import("../../../../").Configuration} */ | ||
module.exports = [ | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
type: "filesystem" | ||
} | ||
}, | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
type: "filesystem" | ||
} | ||
}, | ||
{ | ||
name: "3rd compiler", | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
type: "filesystem" | ||
} | ||
} | ||
]; |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-3/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
it("should build", () => {}); |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-3/test.filter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = config => config.cache; |
4 changes: 4 additions & 0 deletions
4
test/configCases/cache-filesystem/multicompiler-mode-cache-3/warnings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = [ | ||
/Please set unique "cache\.name" option/, | ||
/Compiler with name "3rd compiler" doesn't use unique cache name/ | ||
]; |
32 changes: 32 additions & 0 deletions
32
test/configCases/cache-filesystem/multicompiler-mode-cache-3/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use strict"; | ||
|
||
// with explicit cache names | ||
|
||
/** @type {import("../../../../").Configuration} */ | ||
module.exports = [ | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
name: "filesystem", | ||
type: "filesystem" | ||
} | ||
}, | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
name: "filesystem", | ||
type: "filesystem" | ||
} | ||
}, | ||
{ | ||
name: "3rd compiler", | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
name: "filesystem", | ||
type: "filesystem" | ||
} | ||
} | ||
]; |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-4/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
it("should build", () => {}); |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-4/test.filter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = config => config.cache; |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-4/warnings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = [/Please set unique "cache\.name" option/]; |
23 changes: 23 additions & 0 deletions
23
test/configCases/cache-filesystem/multicompiler-mode-cache-4/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use strict"; | ||
|
||
// with explicit cache names | ||
|
||
/** @type {import("../../../../").Configuration} */ | ||
module.exports = [ | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
name: "default", | ||
type: "filesystem" | ||
} | ||
}, | ||
{ | ||
mode: "production", | ||
entry: "./index", | ||
cache: { | ||
name: "default", | ||
type: "filesystem" | ||
} | ||
} | ||
]; |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-5/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
it("should build", () => {}); |
1 change: 1 addition & 0 deletions
1
test/configCases/cache-filesystem/multicompiler-mode-cache-5/test.filter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = config => config.cache; |
Oops, something went wrong.