Chore: Replace ts-loader in e2e and input-datasource (#76872)

* build(npm): remove ts-loader from core and input-datasource

* build(input-datasource): update webpack config to use swc-loader

* chore(e2e): replace ts-loader with esbuild-loader
This commit is contained in:
Jack Westbrook
2023-10-23 10:45:22 +02:00
committed by GitHub
parent 580a4cac58
commit 964c011822
5 changed files with 24 additions and 42 deletions
+7 -21
View File
@@ -1,32 +1,18 @@
const wp = require('@cypress/webpack-preprocessor');
const { resolve } = require('path');
const anyNodeModules = /node_modules/;
const packageRoot = resolve(`${__dirname}/../../`);
const packageModules = `${packageRoot}/node_modules`;
const webpackOptions = {
module: {
rules: [
{
include: (modulePath) => {
if (!anyNodeModules.test(modulePath)) {
// Is a file within the project
return true;
} else {
// Is a file within this package
return modulePath.startsWith(packageRoot) && !modulePath.startsWith(packageModules);
}
},
test: /\.ts$/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true,
},
exclude: /node_modules/,
use: {
loader: 'esbuild-loader',
options: {
target: 'es2020',
format: undefined,
},
],
},
},
],
},