@qse/edu-scripts 0.0.0-beta.2 → 0.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,11 +172,13 @@ function getWebpackConfig(args, override) {
172
172
  type: "asset/source"
173
173
  },
174
174
  {
175
- test: /\.[jt]sx?$/,
175
+ test: /\.[cm]?[jt]sx?$/,
176
+ exclude: /node_modules/,
176
177
  use: [
177
178
  {
178
179
  loader: "builtin:swc-loader",
179
180
  options: {
181
+ env: { targets: process.env.BROWSERSLIST },
180
182
  rspackExperiments: {
181
183
  import: [
182
184
  {
@@ -186,14 +188,16 @@ function getWebpackConfig(args, override) {
186
188
  ...override.import
187
189
  ]
188
190
  },
191
+ isModule: "unknown",
189
192
  jsc: {
190
193
  parser: {
191
194
  syntax: "typescript",
192
195
  tsx: true,
193
196
  decorators: override.decorators
194
197
  },
195
- // externalHelpers: true,
198
+ externalHelpers: true,
196
199
  transform: {
200
+ legacyDecorator: override.decorators,
197
201
  react: {
198
202
  runtime: "automatic",
199
203
  development: isDev,
@@ -205,6 +209,25 @@ function getWebpackConfig(args, override) {
205
209
  }
206
210
  ]
207
211
  },
212
+ {
213
+ test: /\.[cm]?jsx?$/,
214
+ exclude: /node_modules[\\/](core-js|@swc[\\/]helpers)([\\/]|$)/,
215
+ use: [
216
+ {
217
+ loader: "builtin:swc-loader",
218
+ options: {
219
+ env: { targets: process.env.BROWSERSLIST },
220
+ isModule: "unknown",
221
+ jsc: {
222
+ parser: {
223
+ syntax: "ecmascript"
224
+ },
225
+ externalHelpers: true
226
+ }
227
+ }
228
+ }
229
+ ]
230
+ },
208
231
  {
209
232
  test: cssRegex,
210
233
  exclude: cssModuleRegex,
package/eslint.config.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import config from 'eslint-config-qsb-react'
1
+ import config from '@qse/eslint-config'
2
2
 
3
3
  export default config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qse/edu-scripts",
3
- "version": "0.0.0-beta.2",
3
+ "version": "0.0.0-beta.3",
4
4
  "author": "Kinoko",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,6 +40,7 @@
40
40
  "@rspack/plugin-react-refresh": "^1.6.1",
41
41
  "@svgr/webpack": "^8.1.0",
42
42
  "@swc-node/register": "^1.11.1",
43
+ "@swc/helpers": "^0.5.19",
43
44
  "@types/express": "^4.17.25",
44
45
  "chalk": "^4.1.2",
45
46
  "chokidar": "^3.6.0",
@@ -83,11 +84,11 @@
83
84
  "devDependencies": {
84
85
  "@babel/preset-env": "~7.29.0",
85
86
  "@babel/preset-typescript": "^7.28.5",
87
+ "@qse/eslint-config": "^1.0.0",
86
88
  "@types/fs-extra": "^11.0.4",
87
89
  "@types/jest": "^30.0.0",
88
90
  "@types/yargs": "^17.0.35",
89
91
  "eslint": "^9.39.3",
90
- "eslint-config-qsb-react": "^2.0.4",
91
92
  "father": "^4.5.2",
92
93
  "jest": "^30.2.0",
93
94
  "rimraf": "^6.1.3",
@@ -196,11 +196,13 @@ export default function getWebpackConfig(args, override) {
196
196
  type: 'asset/source',
197
197
  },
198
198
  {
199
- test: /\.[jt]sx?$/,
199
+ test: /\.[cm]?[jt]sx?$/,
200
+ exclude: /node_modules/,
200
201
  use: [
201
202
  {
202
203
  loader: 'builtin:swc-loader',
203
204
  options: {
205
+ env: { targets: process.env.BROWSERSLIST },
204
206
  rspackExperiments: {
205
207
  import: [
206
208
  {
@@ -210,14 +212,16 @@ export default function getWebpackConfig(args, override) {
210
212
  ...override.import,
211
213
  ],
212
214
  },
215
+ isModule: 'unknown',
213
216
  jsc: {
214
217
  parser: {
215
218
  syntax: 'typescript',
216
219
  tsx: true,
217
220
  decorators: override.decorators,
218
221
  },
219
- // externalHelpers: true,
222
+ externalHelpers: true,
220
223
  transform: {
224
+ legacyDecorator: override.decorators,
221
225
  react: {
222
226
  runtime: 'automatic',
223
227
  development: isDev,
@@ -229,6 +233,25 @@ export default function getWebpackConfig(args, override) {
229
233
  },
230
234
  ],
231
235
  },
236
+ {
237
+ test: /\.[cm]?jsx?$/,
238
+ exclude: /node_modules[\\/](core-js|@swc[\\/]helpers)([\\/]|$)/,
239
+ use: [
240
+ {
241
+ loader: 'builtin:swc-loader',
242
+ options: {
243
+ env: { targets: process.env.BROWSERSLIST },
244
+ isModule: 'unknown',
245
+ jsc: {
246
+ parser: {
247
+ syntax: 'ecmascript',
248
+ },
249
+ externalHelpers: true,
250
+ },
251
+ },
252
+ },
253
+ ],
254
+ },
232
255
  {
233
256
  test: cssRegex,
234
257
  exclude: cssModuleRegex,