@budsbox/builder_vite 2.1.2 → 2.2.0
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.
- package/dist/lib.d.ts +1 -0
- package/dist/plain.d.ts +12 -12
- package/dist/plain.js +3 -0
- package/dist/types.d.ts +2 -1
- package/package.json +25 -24
package/dist/lib.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { type LibraryOptions, type UserConfigExport, type UserConfigFnPromise }
|
|
|
7
7
|
*
|
|
8
8
|
* @param base - A custom user configuration function that defines the base options.
|
|
9
9
|
* @returns A configuration factory function that accepts a custom config and an options object to customize or extend the base configuration.
|
|
10
|
+
* @typeParam TOptions - The type of options accepted by the custom user configuration function.
|
|
10
11
|
*/
|
|
11
12
|
export declare function createConfigFactory<TOptions extends object>(base: CustomUserConfigFn<TOptions>): ConfigFactoryWithOptions<TOptions>;
|
|
12
13
|
/**
|
package/dist/plain.d.ts
CHANGED
|
@@ -5,36 +5,36 @@ import { type PluginOptions } from 'vite-plugin-react-rich-svg';
|
|
|
5
5
|
* @see https://github.com/iGoodie/vite-plugin-react-rich-svg?tab=readme-ov-file#plugin-configurations
|
|
6
6
|
*/
|
|
7
7
|
export interface CustomReactRichSvgOptions extends PluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Default SVGO configuration for the whole plugin.
|
|
10
|
+
*/
|
|
11
|
+
svgoConfig?: NonNullable<PluginOptions['rawLoaderOptions']>['svgoConfig'];
|
|
8
12
|
/**
|
|
9
13
|
* Enables/disables SVGO optimization for the whole plugin.
|
|
10
14
|
* Defaults to `true` when `NODE_ENV` is `production`. May be overridden by sub-options (like `rawLoaderOptions.svgoEnabled`).
|
|
11
15
|
*/
|
|
12
16
|
svgoEnabled?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Default SVGO configuration for the whole plugin.
|
|
15
|
-
*/
|
|
16
|
-
svgoConfig?: NonNullable<PluginOptions['rawLoaderOptions']>['svgoConfig'];
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Represents configuration options for plain configurations.
|
|
20
20
|
*/
|
|
21
21
|
export interface PlainConfigOptions {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
importMeta?: ImportMeta;
|
|
26
|
-
/**
|
|
27
|
-
* Whether the configuration is for a library.
|
|
23
|
+
* Whether to add the scope of the package to the conditions for module `exports` resolution.
|
|
28
24
|
*/
|
|
29
|
-
|
|
25
|
+
addScopeToConditions?: boolean;
|
|
30
26
|
/**
|
|
31
27
|
* An array of strings representing the chunks to exclude from the path part when generating scoped names for CSS modules.
|
|
32
28
|
*/
|
|
33
29
|
generateScopedNameExcludedPathChunks?: readonly string[];
|
|
34
30
|
/**
|
|
35
|
-
*
|
|
31
|
+
* The `import.meta` object.
|
|
36
32
|
*/
|
|
37
|
-
|
|
33
|
+
importMeta?: ImportMeta;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the configuration is for a library.
|
|
36
|
+
*/
|
|
37
|
+
lib?: boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Options for the `vite-plugin-react-rich-svg` plugin.
|
|
40
40
|
*/
|
package/dist/plain.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { availableParallelism } from 'node:os';
|
|
1
2
|
import { env } from 'node:process';
|
|
2
3
|
import { NodePackageImporter } from 'sass-embedded';
|
|
3
4
|
import { defaultClientConditions } from 'vite';
|
|
@@ -57,6 +58,7 @@ reactRichSvgOptions = {}, } = {}) => {
|
|
|
57
58
|
build: {
|
|
58
59
|
outDir: '../dist',
|
|
59
60
|
emptyOutDir: true,
|
|
61
|
+
cssMinify: 'lightningcss',
|
|
60
62
|
...fifs(lib, {
|
|
61
63
|
lib: {
|
|
62
64
|
entry: 'index.ts',
|
|
@@ -71,6 +73,7 @@ reactRichSvgOptions = {}, } = {}) => {
|
|
|
71
73
|
localsConvention: 'camelCaseOnly',
|
|
72
74
|
generateScopedName: mode === 'production' ? '[hash:hex]' : (generateScopedNameFactory(basePackage, generateScopedNameExcludedPathChunks)),
|
|
73
75
|
},
|
|
76
|
+
preprocessorMaxWorkers: Math.ceil(availableParallelism() / 2),
|
|
74
77
|
preprocessorOptions: {
|
|
75
78
|
scss: {
|
|
76
79
|
importers: [new NodePackageImporter()],
|
package/dist/types.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import type { Awaitable, Undef } from '@budsbox/lib-types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Represents a custom user configuration function used to generate Vite configuration.
|
|
5
5
|
*
|
|
6
|
-
* @typeParam TOptions - The type of the custom options object, with a default to `object`.
|
|
7
6
|
* @param viteEnv - A readonly object representing the Vite configuration environment.
|
|
8
7
|
* @param options - An optional readonly object representing additional custom configuration options.
|
|
9
8
|
* @returns A promise or value containing the generated Vite user configuration.
|
|
9
|
+
* @typeParam TOptions - The type of the custom options object, with a default to `object`.
|
|
10
10
|
*/
|
|
11
11
|
export type CustomUserConfigFn<TOptions extends object = object> = (viteEnv: Readonly<ConfigEnv>, options?: Undef<Readonly<TOptions>>) => Awaitable<UserConfig>;
|
|
12
12
|
/**
|
|
@@ -24,6 +24,7 @@ export type ConfigFactory = (custom?: UserConfigExport) => UserConfigFnPromise;
|
|
|
24
24
|
* to override or extend default configurations.
|
|
25
25
|
* @param options - An optional object containing additional configuration options, specific to the factory.
|
|
26
26
|
* @returns A function to be invoked by Vite to generate the final configuration object.
|
|
27
|
+
* @typeParam TOptions - The type of the custom options object, with a default to `object`.
|
|
27
28
|
*/
|
|
28
29
|
export type ConfigFactoryWithOptions<TOptions extends object> = (custom?: UserConfigExport, options?: Readonly<Partial<TOptions>>) => UserConfigFnPromise;
|
|
29
30
|
/**
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budsbox/builder_vite",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"homepage": "https://
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"homepage": "https://github.com/budsbox/seed",
|
|
5
5
|
"bugs": {
|
|
6
|
-
"url": "https://
|
|
6
|
+
"url": "https://github.com/budsbox/seed/issues"
|
|
7
7
|
},
|
|
8
|
-
"repository": "
|
|
8
|
+
"repository": "git@github.com:budsbox/seed.git",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": "Konstantin Kutsyllo <trikadin@pm.me>",
|
|
11
11
|
"type": "module",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
22
|
},
|
|
23
23
|
"./client": {
|
|
24
24
|
"types": "./client.d.ts"
|
|
@@ -32,39 +32,40 @@
|
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
34
34
|
"name": "echo $npm_package_name",
|
|
35
|
-
"prepack": "
|
|
35
|
+
"prepack": "run p:ts:prepack",
|
|
36
|
+
"watch": "run p:ts:watch"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@budsbox/lib-es": "^
|
|
39
|
+
"@budsbox/lib-es": "^3.0.0",
|
|
39
40
|
"@budsbox/lib-node": "^1.1.1",
|
|
40
|
-
"@types/node": "^22.
|
|
41
|
+
"@types/node": "^22.19.1",
|
|
41
42
|
"cssesc": "^3.0.0",
|
|
42
43
|
"ts-deepmerge": "^7.0.3",
|
|
43
44
|
"tslib": "^2.8.1",
|
|
44
|
-
"type-fest": "^
|
|
45
|
+
"type-fest": "^5.3.1"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@budsbox/eslint": "^1.
|
|
48
|
+
"@budsbox/eslint": "^1.3.0",
|
|
48
49
|
"@budsbox/eslint_presets-node-lib": "^1.0.5",
|
|
49
50
|
"@budsbox/eslint_presets-tools": "^1.0.5",
|
|
50
|
-
"@budsbox/lib-types": "^1.
|
|
51
|
-
"@budsbox/tsconfigs": "^4.
|
|
52
|
-
"@types/cssesc": "^3",
|
|
51
|
+
"@budsbox/lib-types": "^1.4.0",
|
|
52
|
+
"@budsbox/tsconfigs": "^4.4.0",
|
|
53
|
+
"@types/cssesc": "^3.0.2",
|
|
53
54
|
"@types/eslint": "^9.6.1",
|
|
54
|
-
"@vitejs/plugin-react": "^5.
|
|
55
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
55
56
|
"babel-plugin-react-compiler": "^19.1.0-rc.3",
|
|
56
|
-
"eslint": "^9.
|
|
57
|
-
"sass-embedded": "^1.
|
|
58
|
-
"typescript": "^5.
|
|
59
|
-
"vite": "^7.1
|
|
60
|
-
"vite-plugin-react-rich-svg": "1.
|
|
57
|
+
"eslint": "^9.39.1",
|
|
58
|
+
"sass-embedded": "^1.93.3",
|
|
59
|
+
"typescript": "^5.9.3",
|
|
60
|
+
"vite": "^7.3.1",
|
|
61
|
+
"vite-plugin-react-rich-svg": "^1.3.0"
|
|
61
62
|
},
|
|
62
63
|
"peerDependencies": {
|
|
63
|
-
"@vitejs/plugin-react": "^5.
|
|
64
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
64
65
|
"babel-plugin-react-compiler": "^19.1.0-rc.3",
|
|
65
|
-
"sass-embedded": "^1.
|
|
66
|
-
"vite": "^7.1
|
|
67
|
-
"vite-plugin-react-rich-svg": "1.
|
|
66
|
+
"sass-embedded": "^1.93.3",
|
|
67
|
+
"vite": "^7.3.1",
|
|
68
|
+
"vite-plugin-react-rich-svg": "^1.3.0"
|
|
68
69
|
},
|
|
69
70
|
"packageManager": "yarn@4.9.2"
|
|
70
71
|
}
|