@rsbuild/plugin-svgr 0.7.0-beta.0 → 0.7.0-beta.2
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/index.d.ts +8 -5
- package/package.json +6 -6
- package/dist/loader.d.ts +0 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Rspack, RsbuildPlugin } from '@rsbuild/core';
|
|
2
|
+
import { Config } from '@svgr/core';
|
|
3
|
+
|
|
4
|
+
type SvgDefaultExport = 'component' | 'url';
|
|
5
|
+
type PluginSvgrOptions = {
|
|
5
6
|
/**
|
|
6
7
|
* Configure SVGR options.
|
|
7
8
|
* @see https://react-svgr.com/docs/options/
|
|
@@ -26,4 +27,6 @@ export type PluginSvgrOptions = {
|
|
|
26
27
|
*/
|
|
27
28
|
excludeImporter?: Rspack.RuleSetCondition;
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
+
declare const pluginSvgr: (options?: PluginSvgrOptions) => RsbuildPlugin;
|
|
31
|
+
|
|
32
|
+
export { type PluginSvgrOptions, type SvgDefaultExport, pluginSvgr };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-svgr",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.2",
|
|
4
4
|
"description": "svgr plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@svgr/core": "8.1.0",
|
|
27
27
|
"@svgr/plugin-jsx": "8.1.0",
|
|
28
28
|
"@svgr/plugin-svgo": "8.1.0",
|
|
29
|
-
"@rsbuild/plugin-react": "0.7.0-beta.
|
|
30
|
-
"@rsbuild/shared": "0.7.0-beta.
|
|
29
|
+
"@rsbuild/plugin-react": "0.7.0-beta.2",
|
|
30
|
+
"@rsbuild/shared": "0.7.0-beta.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "18.x",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"prebundle": "1.1.0",
|
|
36
36
|
"typescript": "^5.4.2",
|
|
37
37
|
"url-loader": "4.1.1",
|
|
38
|
-
"@rsbuild/core": "0.7.0-beta.
|
|
39
|
-
"@scripts/test-helper": "0.7.0-beta.
|
|
38
|
+
"@rsbuild/core": "0.7.0-beta.2",
|
|
39
|
+
"@scripts/test-helper": "0.7.0-beta.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@rsbuild/core": "^0.7.0-beta.
|
|
42
|
+
"@rsbuild/core": "^0.7.0-beta.2"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public",
|
package/dist/loader.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017, Smooth Code
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
* modified from https://github.com/gregberge/svgr/blob/7595d378b73d4826a4cead165b3f32386b07315b/packages/webpack/src/index.ts
|
|
7
|
-
*/
|
|
8
|
-
import type { Rspack } from '@rsbuild/core';
|
|
9
|
-
import { type Config } from '@svgr/core';
|
|
10
|
-
declare function svgrLoader(this: Rspack.LoaderContext<Config>, contents: string): void;
|
|
11
|
-
export default svgrLoader;
|