From cd4a2cec7675d1b3cacd3b276b23211bd8e5ea8e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 16 Jul 2026 09:28:42 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .rspack/js.js | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.rspack/js.js b/.rspack/js.js index fae11fc8..251d85f6 100644 --- a/.rspack/js.js +++ b/.rspack/js.js @@ -31,28 +31,25 @@ const noParse = (a) => a.endsWith('.spec.js'); // Rspack's native SWC transform, so client/sw/sw.js (the only file that // uses it) keeps going through babel-loader. Everything else uses // Rspack's built-in SWC loader, which is the main source of the speedup. -const rules = [ - { - test: /sw\/sw\.js$/, - exclude: /node_modules/, - loader: 'babel-loader', - }, - { - test: /\.[mc]?js$/, - exclude: [/node_modules/, /sw\/sw\.js$/], - loader: 'builtin:swc-loader', - options: { - jsc: { - parser: { - syntax: 'ecmascript', - }, - }, - env: { - targets: 'defaults', +const rules = [{ + test: /sw\/sw\.js$/, + exclude: /node_modules/, + loader: 'babel-loader', +}, { + test: /\.[mc]?js$/, + exclude: [/node_modules/, /sw\/sw\.js$/], + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'ecmascript', }, }, + env: { + targets: 'defaults', + }, }, -]; +}]; const plugins = [ new NormalModuleReplacementPlugin(/^node:/, (resource) => {