mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
use fork-ts-checker-webpack-plugin
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
bd4e513e1f
commit
ed380824ef
@ -278,6 +278,7 @@
|
|||||||
"eslint-plugin-react": "^7.32.2",
|
"eslint-plugin-react": "^7.32.2",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"eslint-plugin-unused-imports": "^2.0.0",
|
"eslint-plugin-unused-imports": "^2.0.0",
|
||||||
|
"fork-ts-checker-webpack-plugin": "^7.3.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
"ignore-loader": "^0.1.2",
|
"ignore-loader": "^0.1.2",
|
||||||
"include-media": "^1.4.9",
|
"include-media": "^1.4.9",
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import type webpack from "webpack";
|
import type webpack from "webpack";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
||||||
import webpackLensMain from "./main";
|
import webpackLensMain from "./main";
|
||||||
import { buildDir } from "./vars";
|
import { buildDir } from "./vars";
|
||||||
|
|
||||||
@ -27,7 +28,9 @@ const webpackLensCommon = (): webpack.Configuration => {
|
|||||||
optimization: {
|
optimization: {
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [
|
||||||
|
new ForkTsCheckerPlugin({}),
|
||||||
|
],
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import type webpack from "webpack";
|
import type webpack from "webpack";
|
||||||
import nodeExternals from "webpack-node-externals";
|
import nodeExternals from "webpack-node-externals";
|
||||||
|
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
||||||
import { iconsAndImagesWebpackRules } from "./renderer";
|
import { iconsAndImagesWebpackRules } from "./renderer";
|
||||||
import { DefinePlugin } from "webpack";
|
import { DefinePlugin } from "webpack";
|
||||||
import { buildDir, isDevelopment } from "./vars";
|
import { buildDir, isDevelopment } from "./vars";
|
||||||
@ -54,8 +55,8 @@ const webpackLensMain = (): webpack.Configuration => {
|
|||||||
use: {
|
use: {
|
||||||
loader: "ts-loader",
|
loader: "ts-loader",
|
||||||
options: {
|
options: {
|
||||||
|
transpileOnly: true,
|
||||||
compilerOptions: {
|
compilerOptions: {
|
||||||
declaration: true,
|
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -69,6 +70,16 @@ const webpackLensMain = (): webpack.Configuration => {
|
|||||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||||
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(main|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(main|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||||
}),
|
}),
|
||||||
|
new ForkTsCheckerPlugin({
|
||||||
|
typescript: {
|
||||||
|
mode: "write-dts",
|
||||||
|
configOverwrite: {
|
||||||
|
compilerOptions: {
|
||||||
|
declaration: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import path from "path";
|
|||||||
import type webpack from "webpack";
|
import type webpack from "webpack";
|
||||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
||||||
import CircularDependencyPlugin from "circular-dependency-plugin";
|
import CircularDependencyPlugin from "circular-dependency-plugin";
|
||||||
|
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
||||||
import type { WebpackPluginInstance } from "webpack";
|
import type { WebpackPluginInstance } from "webpack";
|
||||||
import { optimize, DefinePlugin } from "webpack";
|
import { optimize, DefinePlugin } from "webpack";
|
||||||
import nodeExternals from "webpack-node-externals";
|
import nodeExternals from "webpack-node-externals";
|
||||||
@ -67,6 +68,7 @@ export function webpackLensRenderer(): webpack.Configuration {
|
|||||||
use: {
|
use: {
|
||||||
loader: "ts-loader",
|
loader: "ts-loader",
|
||||||
options: {
|
options: {
|
||||||
|
transpileOnly: true,
|
||||||
compilerOptions: {
|
compilerOptions: {
|
||||||
declaration: true,
|
declaration: true,
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
@ -85,6 +87,7 @@ export function webpackLensRenderer(): webpack.Configuration {
|
|||||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||||
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||||
}),
|
}),
|
||||||
|
new ForkTsCheckerPlugin({}),
|
||||||
|
|
||||||
new CircularDependencyPlugin({
|
new CircularDependencyPlugin({
|
||||||
cwd: __dirname,
|
cwd: __dirname,
|
||||||
|
|||||||
@ -4496,7 +4496,7 @@ cosmiconfig@^6.0.0:
|
|||||||
path-type "^4.0.0"
|
path-type "^4.0.0"
|
||||||
yaml "^1.7.2"
|
yaml "^1.7.2"
|
||||||
|
|
||||||
cosmiconfig@^7.0.0:
|
cosmiconfig@^7.0.0, cosmiconfig@^7.0.1:
|
||||||
version "7.1.0"
|
version "7.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
|
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
|
||||||
integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==
|
integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==
|
||||||
@ -6229,6 +6229,24 @@ forever-agent@~0.6.1:
|
|||||||
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
|
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
|
||||||
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
|
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
|
||||||
|
|
||||||
|
fork-ts-checker-webpack-plugin@^7.3.0:
|
||||||
|
version "7.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-7.3.0.tgz#a9c984a018493962360d7c7e77a67b44a2d5f3aa"
|
||||||
|
integrity sha512-IN+XTzusCjR5VgntYFgxbxVx3WraPRnKehBFrf00cMSrtUuW9MsG9dhL6MWpY6MkjC3wVwoujfCDgZZCQwbswA==
|
||||||
|
dependencies:
|
||||||
|
"@babel/code-frame" "^7.16.7"
|
||||||
|
chalk "^4.1.2"
|
||||||
|
chokidar "^3.5.3"
|
||||||
|
cosmiconfig "^7.0.1"
|
||||||
|
deepmerge "^4.2.2"
|
||||||
|
fs-extra "^10.0.0"
|
||||||
|
memfs "^3.4.1"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
node-abort-controller "^3.0.1"
|
||||||
|
schema-utils "^3.1.1"
|
||||||
|
semver "^7.3.5"
|
||||||
|
tapable "^2.2.1"
|
||||||
|
|
||||||
form-data@^2.5.0:
|
form-data@^2.5.0:
|
||||||
version "2.5.1"
|
version "2.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
|
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
|
||||||
@ -9280,6 +9298,11 @@ node-abi@^3.3.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
semver "^7.3.5"
|
semver "^7.3.5"
|
||||||
|
|
||||||
|
node-abort-controller@^3.0.1:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548"
|
||||||
|
integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==
|
||||||
|
|
||||||
node-addon-api@^1.6.3:
|
node-addon-api@^1.6.3:
|
||||||
version "1.7.2"
|
version "1.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d"
|
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d"
|
||||||
@ -12014,7 +12037,7 @@ tailwindcss@^3.2.4:
|
|||||||
quick-lru "^5.1.1"
|
quick-lru "^5.1.1"
|
||||||
resolve "^1.22.1"
|
resolve "^1.22.1"
|
||||||
|
|
||||||
tapable@^2.1.1, tapable@^2.2.0:
|
tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1:
|
||||||
version "2.2.1"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
|
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
|
||||||
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
|
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user