@@ -293,7 +293,7 @@ declare module '@swc/core' {
293
293
* presence of the filename.
294
294
* - Options like "test", "exclude", and "ignore" require the filename
295
295
* for string/RegExp matching.
296
- * - swc.config.js files are loaded relative to the file being compiled.
296
+ * - .swcrc files are loaded relative to the file being compiled.
297
297
* If this option is omitted, Swc will behave as if swcrc: false has been set.
298
298
*/
299
299
filename ?: string ,
@@ -317,27 +317,27 @@ declare module '@swc/core' {
317
317
*
318
318
* "root" - Passes the "root" value through as unchanged.
319
319
* "upward" - Walks upward from the "root" directory, looking for a directory
320
- * containing a swc.config.js file, and throws an error if a swc.config.js
320
+ * containing a .swcrc file, and throws an error if a .swcrc
321
321
* is not found.
322
322
* "upward-optional" - Walk upward from the "root" directory, looking for
323
- * a directory containing a swc.config.js file, and falls back to "root"
324
- * if a swc.config.js is not found.
323
+ * a directory containing a .swcrc file, and falls back to "root"
324
+ * if a .swcrc is not found.
325
325
*
326
326
*
327
327
* "root" is the default mode because it avoids the risk that Swc
328
- * will accidentally load a swc.config.js that is entirely outside
328
+ * will accidentally load a .swcrc that is entirely outside
329
329
* of the current project folder. If you use "upward-optional",
330
330
* be aware that it will walk up the directory structure all the
331
331
* way to the filesystem root, and it is always possible that someone
332
- * will have a forgotten swc.config.js in their home directory,
332
+ * will have a forgotten .swcrc in their home directory,
333
333
* which could cause unexpected errors in your builds.
334
334
*
335
335
*
336
336
* Users with monorepo project structures that run builds/tests on a
337
337
* per-package basis may well want to use "upward" since monorepos
338
- * often have a swc.config.js in the project root. Running Swc
338
+ * often have a .swcrc in the project root. Running Swc
339
339
* in a monorepo subdirectory without "upward", will cause Swc
340
- * to skip loading any swc.config.js files in the project root,
340
+ * to skip loading any .swcrc files in the project root,
341
341
* which can lead to unexpected errors and compilation failure.
342
342
*/
343
343
rootMode ?: 'root' | 'upward' | 'upward-optional' ,
@@ -353,19 +353,19 @@ declare module '@swc/core' {
353
353
envName ?: string ,
354
354
355
355
/**
356
- * Defaults to searching for a default `swc.config.js ` file, but can
356
+ * Defaults to searching for a default `.swcrc ` file, but can
357
357
* be passed the path of any JS or JSON5 config file.
358
358
*
359
359
*
360
- * NOTE: This option does not affect loading of swc.config.js files,
361
- * so while it may be tempting to do configFile: "./foo/swc.config.js ",
362
- * it is not recommended. If the given swc.config.js is loaded via the
360
+ * NOTE: This option does not affect loading of .swcrc files,
361
+ * so while it may be tempting to do configFile: "./foo/.swcrc ",
362
+ * it is not recommended. If the given .swcrc is loaded via the
363
363
* standard file-relative logic, you'll end up loading the same
364
364
* config file twice, merging it with itself. If you are linking
365
365
* a specific config file, it is recommended to stick with a
366
366
* naming scheme that is independent of the "swcrc" name.
367
367
*
368
- * Defaults to `path.resolve(opts.root, "swc.config.js ")`
368
+ * Defaults to `path.resolve(opts.root, ".swcrc ")`
369
369
*/
370
370
configFile ?: string | boolean ,
371
371
@@ -374,7 +374,7 @@ declare module '@swc/core' {
374
374
*
375
375
* A swcrc value passed in the programmatic options will override one set within a configuration file.
376
376
*
377
- * Note: swc.config.js files are only loaded if the current "filename" is inside of
377
+ * Note: .swcrc files are only loaded if the current "filename" is inside of
378
378
* a package that matches one of the "swcrcRoots" packages.
379
379
*
380
380
*
@@ -494,7 +494,7 @@ declare module '@swc/core' {
494
494
| } ;
495
495
declare export type Swcrc = Config | Config[];
496
496
/**
497
- * swc.config.js
497
+ * .swcrc
498
498
*/
499
499
declare export type Config = { |
500
500
/**
0 commit comments