@qse/edu-scripts 0.0.0-beta.0 → 0.0.0-beta.1
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.
|
@@ -4,9 +4,9 @@ import type { Configuration as DevServerConfiguration } from '@rspack/dev-server
|
|
|
4
4
|
type ProxyConfigArray = NonNullable<DevServerConfiguration['proxy']>;
|
|
5
5
|
export type BabelImportPlugin = {
|
|
6
6
|
libraryName: string;
|
|
7
|
-
libraryDirectory
|
|
8
|
-
|
|
9
|
-
style?: boolean | 'css' |
|
|
7
|
+
libraryDirectory?: string;
|
|
8
|
+
customName?: string;
|
|
9
|
+
style?: boolean | 'css' | string;
|
|
10
10
|
};
|
|
11
11
|
export type Config = {
|
|
12
12
|
webpack?: (config: Configuration) => Configuration | undefined;
|
|
@@ -69,7 +69,14 @@ export type Config = {
|
|
|
69
69
|
* @default false
|
|
70
70
|
*/
|
|
71
71
|
decorators?: boolean;
|
|
72
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* 与 babel-plugin-import 类似,但是内部是 rspack 重构,libraryDirectory 默认值是 lib
|
|
74
|
+
*
|
|
75
|
+
* 如果 libraryDirectory 传 ’‘ 则必须使用 customName 来写
|
|
76
|
+
*
|
|
77
|
+
* @see https://rspack.rs/zh/guide/features/builtin-swc-loader#rspackexperimentsimport
|
|
78
|
+
* @default [{libraryName: 'lodash', customName: 'lodash/{{member}}'}]
|
|
79
|
+
*/
|
|
73
80
|
import?: BabelImportPlugin[];
|
|
74
81
|
};
|
|
75
82
|
export declare function defineConfig(config: Config): Config;
|
package/package.json
CHANGED
|
@@ -6,9 +6,9 @@ type ProxyConfigArray = NonNullable<DevServerConfiguration['proxy']>
|
|
|
6
6
|
|
|
7
7
|
export type BabelImportPlugin = {
|
|
8
8
|
libraryName: string
|
|
9
|
-
libraryDirectory
|
|
10
|
-
|
|
11
|
-
style?: boolean | 'css' |
|
|
9
|
+
libraryDirectory?: string
|
|
10
|
+
customName?: string
|
|
11
|
+
style?: boolean | 'css' | string
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export type Config = {
|
|
@@ -73,7 +73,14 @@ export type Config = {
|
|
|
73
73
|
* @default false
|
|
74
74
|
*/
|
|
75
75
|
decorators?: boolean
|
|
76
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* 与 babel-plugin-import 类似,但是内部是 rspack 重构,libraryDirectory 默认值是 lib
|
|
78
|
+
*
|
|
79
|
+
* 如果 libraryDirectory 传 ’‘ 则必须使用 customName 来写
|
|
80
|
+
*
|
|
81
|
+
* @see https://rspack.rs/zh/guide/features/builtin-swc-loader#rspackexperimentsimport
|
|
82
|
+
* @default [{libraryName: 'lodash', customName: 'lodash/{{member}}'}]
|
|
83
|
+
*/
|
|
77
84
|
import?: BabelImportPlugin[]
|
|
78
85
|
}
|
|
79
86
|
export function defineConfig(config: Config) {
|