mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: no-unused-expressions (error) (#4197)
This commit is contained in:
1 parent
c6dab62e99
commit
e74f17e8ce
9 files changed
+79
-50
No files matched your search
@@ -23,20 +23,18 @@ import esbuild from "esbuild";
|
||||
|
||||
/**
|
||||
* A function returning webpack ts/tsx loader
|
||||
*
|
||||
*
|
||||
* depends on env LENS_DEV_USE_ESBUILD_LOADER to use esbuild-loader (faster) or good-old ts-loader
|
||||
*
|
||||
* @param testRegExp - the regex for webpack to conditional find the files
|
||||
*
|
||||
* @param testRegExp - the regex for webpack to conditional find the files
|
||||
* @returns ts/tsx webpack loader configuration object
|
||||
*/
|
||||
const getTSLoader = (
|
||||
testRegExp: RegExp, transpileOnly = true
|
||||
) => {
|
||||
const useEsbuildLoader = process.env.LENS_DEV_USE_ESBUILD_LOADER === "true";
|
||||
if (process.env.LENS_DEV_USE_ESBUILD_LOADER === "true") {
|
||||
console.info(`\n🚀 using esbuild-loader for ts(x)`);
|
||||
|
||||
useEsbuildLoader && console.info(`\n🚀 using esbuild-loader for ts(x)`);
|
||||
|
||||
if (useEsbuildLoader) {
|
||||
return {
|
||||
test: testRegExp,
|
||||
loader: "esbuild-loader",
|
||||
|
||||
Reference in new issue
Block a user