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 committed 2021-05-20 16:40:43 +03:00
1 parent 3fc104c147
commit 282b600229
1 file changed
+4 -3
+4 -3
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",