|
6 | 6 | This Babel plugin transforms indirect imports through a barrel file (index.js) into direct imports. |
7 | 7 |
|
8 | 8 | ### Note |
9 | | -This plugin is intended for developers who use barrel files (index.js) with dynamic imports and/or CSS imports in their code when using the Webpack bundler or Jest. I don't know if it's needed to use in other bundlers such as Parcel, Rollup Vite and etc. |
| 9 | +This plugin is intended for developers who use barrel files (index.js) with the Webpack or Vite bundlers, or when running tests with Jest. I don't know if it's beneficial to use with other bundlers such as Parcel, Rollup, etc. |
10 | 10 |
|
11 | 11 | ## Example |
12 | 12 |
|
@@ -59,16 +59,13 @@ import { List } from './components/List/List' |
59 | 59 |
|
60 | 60 | ## Options |
61 | 61 |
|
62 | | -| **Name** | **Type** | **Default** | **Description** | |
63 | | -|:-------------------:|:---------:|:---------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| |
64 | | -| `webpackAlias` | `object` | `{}` | It should be assigned with the `alias` value option from the Webpack config. | |
65 | | -| `viteAlias` | `object` | `{}` | It should be assigned with the `alias` value option from the Vite config. | |
66 | | -| `jestAlias` | `array` | `[]` | It should be assigned with the `moduleNameMapper` value option from the Jest config. | |
67 | | -| `webpackExtensions` | `array` | `[".js", ".jsx", ".ts", ".tsx"]` | It should be assigned with the `extensions` value option from the Webpack config. | |
68 | | -| `viteExtensions` | `array` | `[".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"]` | It should be assigned with the `extensions` value option from the Vite config. | |
69 | | -| `jestExtensions` | `array` | `["js", "jsx", "ts", "tsx"]` | It should be assigned with the `moduleFileExtensions` value option from the Jest config. | |
70 | | -| `isCacheEnabled` | `boolean` | `false` | If `true`, enables file-based cache. | |
71 | | -| `logging` | `object` | `{ type: "disabled", filePath: "log.txt" }` | Specifies logging options.<br>`type` can be `disabled` for no logging, `file` for logs to a file, or `screen` for logs to the console.<br>If type is `file`, `filePath` specifies the log file path. | |
| 62 | +| **Name** | **Type** | **Default** | **Description** | |
| 63 | +|:----------------:|:---------:|:------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| |
| 64 | +| `executorName` | `string` | `"other"` | It should be assigned with one of the supported executor values: `webpack`, `vite` or `jest`. | |
| 65 | +| `alias` | `object` | `{}` | It should be assigned with the `alias` value option from the executor config. | |
| 66 | +| `extensions` | `array` | `[".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx"]` | It should be assigned with the `extensions` value option from the executor config. | |
| 67 | +| `isCacheEnabled` | `boolean` | `false` | If `true`, enables file-based cache. | |
| 68 | +| `logging` | `object` | `{ type: "disabled", filePath: "log.txt" }` | Specifies logging options.<br>`type` can be `disabled` for no logging, `file` for logs to a file, or `screen` for logs to the console.<br>If type is `file`, `filePath` specifies the log file path. | |
72 | 69 |
|
73 | 70 | ## The Problem |
74 | 71 |
|
|
0 commit comments