1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Change env name to LENS_DEV_USE_ESBUILD_LOADER

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen 2021-05-20 16:36:23 +03:00
parent 3fc104c147
commit 282b600229
No known key found for this signature in database
GPG Key ID: 54B44603D251B788

View File

@ -22,7 +22,7 @@
/**
* A function returning webpack ts/tsx loader
*
* depends on env USE_ESBUILD_LOADER to use esbuild-loader (faster) or good-old ts-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
* @returns ts/tsx webpack loader configuration object
@ -30,12 +30,13 @@
const getTsloader = (
testRegExp: RegExp, transpileOnly = true
) => {
const useEsbuildLoader = process.env.USE_ESBUILD_LOADER === "true";
const useEsbuildLoader = process.env.LENS_DEV_USE_ESBUILD_LOADER === "true";
useEsbuildLoader && console.info(`\n🚀 using esbuild-loader for ts(x)`);
if (useEsbuildLoader) {
return {
test: testRegExp,
exclude: /node_modules/,
loader: "esbuild-loader",
options: {
loader: "tsx",