@rsbuild/plugin-svgr 0.7.6 → 0.7.7

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.
@@ -2,19 +2,19 @@
2
2
  /******/ "use strict";
3
3
  /******/ var __webpack_modules__ = ({
4
4
 
5
- /***/ 43:
5
+ /***/ 547:
6
6
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
7
7
 
8
8
 
9
9
 
10
- const loader = __nccwpck_require__(86);
10
+ const loader = __nccwpck_require__(259);
11
11
 
12
12
  module.exports = loader.default;
13
13
  module.exports.raw = loader.raw;
14
14
 
15
15
  /***/ }),
16
16
 
17
- /***/ 86:
17
+ /***/ 259:
18
18
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
19
19
 
20
20
 
@@ -31,9 +31,9 @@ var _loaderUtils = __nccwpck_require__(72);
31
31
 
32
32
  var _schemaUtils = __nccwpck_require__(14);
33
33
 
34
- var _options = _interopRequireDefault(__nccwpck_require__(284));
34
+ var _options = _interopRequireDefault(__nccwpck_require__(647));
35
35
 
36
- var _utils = __nccwpck_require__(318);
36
+ var _utils = __nccwpck_require__(898);
37
37
 
38
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
39
 
@@ -107,7 +107,7 @@ exports.raw = raw;
107
107
 
108
108
  /***/ }),
109
109
 
110
- /***/ 318:
110
+ /***/ 898:
111
111
  /***/ ((__unused_webpack_module, exports) => {
112
112
 
113
113
 
@@ -176,7 +176,7 @@ module.exports = require("path");
176
176
 
177
177
  /***/ }),
178
178
 
179
- /***/ 284:
179
+ /***/ 647:
180
180
  /***/ ((module) => {
181
181
 
182
182
  module.exports = JSON.parse('{"additionalProperties":true,"properties":{"name":{"description":"The filename template for the target file(s) (https://github.com/webpack-contrib/file-loader#name).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"outputPath":{"description":"A filesystem path where the target file(s) will be placed (https://github.com/webpack-contrib/file-loader#outputpath).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"publicPath":{"description":"A custom public path for the target file(s) (https://github.com/webpack-contrib/file-loader#publicpath).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"postTransformPublicPath":{"description":"A custom transformation function for post-processing the publicPath (https://github.com/webpack-contrib/file-loader#posttransformpublicpath).","instanceof":"Function"},"context":{"description":"A custom file context (https://github.com/webpack-contrib/file-loader#context).","type":"string"},"emitFile":{"description":"Enables/Disables emit files (https://github.com/webpack-contrib/file-loader#emitfile).","type":"boolean"},"regExp":{"description":"A Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name property using [N] placeholder (https://github.com/webpack-contrib/file-loader#regexp).","anyOf":[{"type":"string"},{"instanceof":"RegExp"}]},"esModule":{"description":"By default, file-loader generates JS modules that use the ES modules syntax.","type":"boolean"}},"type":"object"}');
@@ -225,7 +225,7 @@ module.exports = JSON.parse('{"additionalProperties":true,"properties":{"name":{
225
225
  /******/ // startup
226
226
  /******/ // Load entry module and return exports
227
227
  /******/ // This entry module is referenced by other modules so it can't be inlined
228
- /******/ var __webpack_exports__ = __nccwpck_require__(43);
228
+ /******/ var __webpack_exports__ = __nccwpck_require__(547);
229
229
  /******/ module.exports = __webpack_exports__;
230
230
  /******/
231
231
  /******/ })()
@@ -2,19 +2,19 @@
2
2
  /******/ "use strict";
3
3
  /******/ var __webpack_modules__ = ({
4
4
 
5
- /***/ 219:
5
+ /***/ 288:
6
6
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
7
7
 
8
8
 
9
9
 
10
- const loader = __nccwpck_require__(401);
10
+ const loader = __nccwpck_require__(998);
11
11
 
12
12
  module.exports = loader.default;
13
13
  module.exports.raw = loader.raw;
14
14
 
15
15
  /***/ }),
16
16
 
17
- /***/ 401:
17
+ /***/ 998:
18
18
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
19
19
 
20
20
 
@@ -33,9 +33,9 @@ var _schemaUtils = __nccwpck_require__(14);
33
33
 
34
34
  var _mimeTypes = _interopRequireDefault(__nccwpck_require__(31));
35
35
 
36
- var _normalizeFallback = _interopRequireDefault(__nccwpck_require__(547));
36
+ var _normalizeFallback = _interopRequireDefault(__nccwpck_require__(6));
37
37
 
38
- var _options = _interopRequireDefault(__nccwpck_require__(81));
38
+ var _options = _interopRequireDefault(__nccwpck_require__(225));
39
39
 
40
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
41
 
@@ -152,7 +152,7 @@ exports.raw = raw;
152
152
 
153
153
  /***/ }),
154
154
 
155
- /***/ 547:
155
+ /***/ 6:
156
156
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
157
157
 
158
158
 
@@ -225,7 +225,7 @@ module.exports = require("path");
225
225
 
226
226
  /***/ }),
227
227
 
228
- /***/ 81:
228
+ /***/ 225:
229
229
  /***/ ((module) => {
230
230
 
231
231
  module.exports = JSON.parse('{"type":"object","properties":{"limit":{"description":"Enables/Disables transformation target file into base64 URIs (https://github.com/webpack-contrib/url-loader#limit).","type":["boolean","number","string"]},"encoding":{"description":"Specify the encoding which the file will be in-lined with.","oneOf":[{"type":"boolean"},{"enum":["utf8","utf16le","latin1","base64","hex","ascii","binary","ucs2"]}]},"mimetype":{"description":"The MIME type for the file to be transformed (https://github.com/webpack-contrib/url-loader#mimetype).","oneOf":[{"type":"boolean"},{"type":"string"}]},"generator":{"description":"Adding custom implementation for encoding files.","instanceof":"Function"},"fallback":{"description":"An alternative loader to use when a target file\'s size exceeds the limit set in the limit option (https://github.com/webpack-contrib/url-loader#fallback).","anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"loader":{"description":"Fallback loader name.","type":"string"},"options":{"description":"Fallback loader options.","anyOf":[{"type":"object"},{"type":"string"}]}},"type":"object"}]},"esModule":{"description":"By default, url-loader generates JS modules that use the ES modules syntax.","type":"boolean"}},"additionalProperties":true}');
@@ -274,7 +274,7 @@ module.exports = JSON.parse('{"type":"object","properties":{"limit":{"descriptio
274
274
  /******/ // startup
275
275
  /******/ // Load entry module and return exports
276
276
  /******/ // This entry module is referenced by other modules so it can't be inlined
277
- /******/ var __webpack_exports__ = __nccwpck_require__(219);
277
+ /******/ var __webpack_exports__ = __nccwpck_require__(288);
278
278
  /******/ module.exports = __webpack_exports__;
279
279
  /******/
280
280
  /******/ })()
package/dist/index.cjs CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
+ PLUGIN_SVGR_NAME: () => PLUGIN_SVGR_NAME,
33
34
  SVG_REGEX: () => SVG_REGEX,
34
35
  pluginSvgr: () => pluginSvgr
35
36
  });
@@ -55,8 +56,9 @@ function getSvgoDefaultConfig() {
55
56
  ]
56
57
  };
57
58
  }
59
+ var PLUGIN_SVGR_NAME = "rsbuild:svgr";
58
60
  var pluginSvgr = (options = {}) => ({
59
- name: "rsbuild:svgr",
61
+ name: PLUGIN_SVGR_NAME,
60
62
  pre: [import_plugin_react.PLUGIN_REACT_NAME],
61
63
  setup(api) {
62
64
  api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID }) => {
@@ -133,6 +135,7 @@ var pluginSvgr = (options = {}) => ({
133
135
  });
134
136
  // Annotate the CommonJS export names for ESM import in node:
135
137
  0 && (module.exports = {
138
+ PLUGIN_SVGR_NAME,
136
139
  SVG_REGEX,
137
140
  pluginSvgr
138
141
  });
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ type PluginSvgrOptions = {
28
28
  */
29
29
  excludeImporter?: Rspack.RuleSetCondition;
30
30
  };
31
+ declare const PLUGIN_SVGR_NAME = "rsbuild:svgr";
31
32
  declare const pluginSvgr: (options?: PluginSvgrOptions) => RsbuildPlugin;
32
33
 
33
- export { type PluginSvgrOptions, SVG_REGEX, type SvgDefaultExport, pluginSvgr };
34
+ export { PLUGIN_SVGR_NAME, type PluginSvgrOptions, SVG_REGEX, type SvgDefaultExport, pluginSvgr };
package/dist/index.js CHANGED
@@ -36,8 +36,9 @@ function getSvgoDefaultConfig() {
36
36
  ]
37
37
  };
38
38
  }
39
+ var PLUGIN_SVGR_NAME = "rsbuild:svgr";
39
40
  var pluginSvgr = (options = {}) => ({
40
- name: "rsbuild:svgr",
41
+ name: PLUGIN_SVGR_NAME,
41
42
  pre: [PLUGIN_REACT_NAME],
42
43
  setup(api) {
43
44
  api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID }) => {
@@ -113,6 +114,7 @@ var pluginSvgr = (options = {}) => ({
113
114
  }
114
115
  });
115
116
  export {
117
+ PLUGIN_SVGR_NAME,
116
118
  SVG_REGEX,
117
119
  pluginSvgr
118
120
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-svgr",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
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.6",
30
- "@rsbuild/shared": "0.7.6"
29
+ "@rsbuild/plugin-react": "0.7.7",
30
+ "@rsbuild/shared": "0.7.7"
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.6",
39
- "@scripts/test-helper": "0.7.6"
38
+ "@rsbuild/core": "0.7.7",
39
+ "@scripts/test-helper": "0.7.7"
40
40
  },
41
41
  "peerDependencies": {
42
- "@rsbuild/core": "^0.7.6"
42
+ "@rsbuild/core": "^0.7.7"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public",