Skip to content
This repository was archived by the owner on Dec 30, 2019. It is now read-only.

Commit fac84e4

Browse files
committed
Second attempt: Try to disable external type-checker ... still no luck.
1 parent b025040 commit fac84e4

File tree

2 files changed

+38
-11
lines changed

2 files changed

+38
-11
lines changed

tests/e2e/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"extends": "../../tsconfig.json",
32
"compilerOptions": {
43
"target": "es5",
54
"lib": ["es5", "dom"],

vue.config.js

+38-10
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,20 @@ module.exports = {
3333
.when(process.env.NODE_ENV === "production", config => {
3434
// Use a runtime chunk to optimize cache busting.
3535
// Otherwise, the runtime information would be added to the entry point.
36-
config
37-
.optimization
38-
.runtimeChunk({ name: "runtime" });
36+
if (!process.env.CYPRESS_ENV) {
37+
config
38+
.optimization
39+
.runtimeChunk({ name: "runtime" });
40+
}
3941

40-
// Configure path alias for rxjs.
41-
const rxPaths = require("rxjs/_esm2015/path-mapping");
42-
const rxResolvedPaths = rxPaths();
43-
for (const p in rxResolvedPaths) {
44-
if (rxResolvedPaths.hasOwnProperty(p)) {
45-
config.resolve.alias.set(p, rxResolvedPaths[p]);
46-
}
42+
// Configure path alias for rxjs.
43+
const rxPaths = require("rxjs/_esm2015/path-mapping");
44+
const rxResolvedPaths = rxPaths();
45+
for (const p in rxResolvedPaths) {
46+
if (rxResolvedPaths.hasOwnProperty(p)) {
47+
config.resolve.alias.set(p, rxResolvedPaths[p]);
4748
}
49+
}
4850

4951
// Configure style purging.
5052
const purgeOptions = {
@@ -82,6 +84,32 @@ module.exports = {
8284
return args;
8385
})
8486
;
87+
88+
// Disable fork-ts-checker and switch ts-loader to also perform type checking.
89+
// Some optimizations are not applied otherwise, thus...
90+
// Unluckily, this means that we cannot use thread-loader for this ...
91+
config
92+
.plugins
93+
.delete("fork-ts-checker");
94+
95+
config
96+
.module
97+
.rule("ts")
98+
.uses
99+
.delete("thread-loader");
100+
101+
config
102+
.module
103+
.rule("ts")
104+
.use("ts-loader")
105+
.options({
106+
transpileOnly: false,
107+
appendTsSuffixTo: [
108+
"\\.vue$"
109+
],
110+
happyPackMode: false,
111+
allowTsInNodeModules: true
112+
});
85113
});
86114
}
87115
};

0 commit comments

Comments
 (0)