Skip to content

Commit

Permalink
fix custom typescript helper types resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimiry committed Jun 6, 2019
1 parent 576d87a commit 6c11541
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
5 changes: 3 additions & 2 deletions scripts/electron-builder/hooks/afterPack/tsconfig.json
Expand Up @@ -6,7 +6,8 @@
"sourceMap": false,
"outDir": "."
},
"files": [
"./index.ts"
"include": [
"../../../../src/@types/**/*",
"./**/*"
]
}
4 changes: 2 additions & 2 deletions src/electron-main/tsconfig.json
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": [
"./**/*",
"./../../src/@types/**/*"
"../../src/@types/**/*",
"./**/*"
],
"exclude": [
"./**/*.spec.ts"
Expand Down
2 changes: 1 addition & 1 deletion src/electron-preload/tsconfig.json
@@ -1,6 +1,6 @@
{
"extends": "../../tsconfig.json",
"include": [
"./../../src/@types/**/*"
"../../src/@types/**/*"
]
}
5 changes: 4 additions & 1 deletion webpack/electron-builder-hooks.ts
Expand Up @@ -2,6 +2,7 @@ import nodeExternals from "webpack-node-externals";
import path from "path";
import {Configuration} from "webpack";

import {LoaderConfig as TsLoaderConfig} from "awesome-typescript-loader/src/interfaces";
import {buildBaseConfig, rootRelativePath} from "./lib";

const hooksDir = (...value: string[]) => path.join(
Expand Down Expand Up @@ -41,7 +42,9 @@ const configurations: Configuration[] = hooksToBuild.map((hookDirName) => {
test: /\.ts$/,
use: {
loader: "awesome-typescript-loader",
options: {configFileName: tsConfigFile},
options: {
configFileName: tsConfigFile,
} as TsLoaderConfig,
},
},
],
Expand Down
5 changes: 4 additions & 1 deletion webpack/electron-main.ts
@@ -1,5 +1,6 @@
import nodeExternals from "webpack-node-externals";

import {LoaderConfig as TsLoaderConfig} from "awesome-typescript-loader/src/interfaces";
import {buildBaseConfig, srcRelativePath} from "./lib";

const tsConfigFile = srcRelativePath("./electron-main/tsconfig.json");
Expand All @@ -16,7 +17,9 @@ export default buildBaseConfig(
test: /\.ts$/,
use: {
loader: "awesome-typescript-loader",
options: {configFileName: tsConfigFile},
options: {
configFileName: tsConfigFile,
} as TsLoaderConfig,
},
},
],
Expand Down
5 changes: 4 additions & 1 deletion webpack/electron-preload.ts
@@ -1,5 +1,6 @@
import {Configuration} from "webpack";

import {LoaderConfig as TsLoaderConfig} from "awesome-typescript-loader/src/interfaces";
import {buildBaseConfig, environment, srcRelativePath} from "./lib";

const configs = [
Expand Down Expand Up @@ -55,7 +56,9 @@ function buildRendererConfig(entry: Configuration["entry"], tsConfigFile: string
test: /\.ts$/,
use: {
loader: "awesome-typescript-loader",
options: {configFileName: tsConfigFile},
options: {
configFileName: tsConfigFile,
} as TsLoaderConfig,
},
},
],
Expand Down

0 comments on commit 6c11541

Please sign in to comment.