@rsbuild/plugin-svgr 0.6.8 → 0.6.9
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/compiled/file-loader/index.js +232 -1
- package/compiled/url-loader/index.js +281 -1
- package/package.json +7 -7
|
@@ -1 +1,232 @@
|
|
|
1
|
-
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ 43:
|
|
6
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const loader = __nccwpck_require__(86);
|
|
11
|
+
|
|
12
|
+
module.exports = loader.default;
|
|
13
|
+
module.exports.raw = loader.raw;
|
|
14
|
+
|
|
15
|
+
/***/ }),
|
|
16
|
+
|
|
17
|
+
/***/ 86:
|
|
18
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
23
|
+
value: true
|
|
24
|
+
}));
|
|
25
|
+
exports["default"] = loader;
|
|
26
|
+
exports.raw = void 0;
|
|
27
|
+
|
|
28
|
+
var _path = _interopRequireDefault(__nccwpck_require__(17));
|
|
29
|
+
|
|
30
|
+
var _loaderUtils = __nccwpck_require__(72);
|
|
31
|
+
|
|
32
|
+
var _schemaUtils = __nccwpck_require__(14);
|
|
33
|
+
|
|
34
|
+
var _options = _interopRequireDefault(__nccwpck_require__(284));
|
|
35
|
+
|
|
36
|
+
var _utils = __nccwpck_require__(318);
|
|
37
|
+
|
|
38
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
|
+
|
|
40
|
+
function loader(content) {
|
|
41
|
+
const options = (0, _loaderUtils.getOptions)(this);
|
|
42
|
+
(0, _schemaUtils.validate)(_options.default, options, {
|
|
43
|
+
name: 'File Loader',
|
|
44
|
+
baseDataPath: 'options'
|
|
45
|
+
});
|
|
46
|
+
const context = options.context || this.rootContext;
|
|
47
|
+
const name = options.name || '[contenthash].[ext]';
|
|
48
|
+
const url = (0, _loaderUtils.interpolateName)(this, name, {
|
|
49
|
+
context,
|
|
50
|
+
content,
|
|
51
|
+
regExp: options.regExp
|
|
52
|
+
});
|
|
53
|
+
let outputPath = url;
|
|
54
|
+
|
|
55
|
+
if (options.outputPath) {
|
|
56
|
+
if (typeof options.outputPath === 'function') {
|
|
57
|
+
outputPath = options.outputPath(url, this.resourcePath, context);
|
|
58
|
+
} else {
|
|
59
|
+
outputPath = _path.default.posix.join(options.outputPath, url);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let publicPath = `__webpack_public_path__ + ${JSON.stringify(outputPath)}`;
|
|
64
|
+
|
|
65
|
+
if (options.publicPath) {
|
|
66
|
+
if (typeof options.publicPath === 'function') {
|
|
67
|
+
publicPath = options.publicPath(url, this.resourcePath, context);
|
|
68
|
+
} else {
|
|
69
|
+
publicPath = `${options.publicPath.endsWith('/') ? options.publicPath : `${options.publicPath}/`}${url}`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
publicPath = JSON.stringify(publicPath);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (options.postTransformPublicPath) {
|
|
76
|
+
publicPath = options.postTransformPublicPath(publicPath);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (typeof options.emitFile === 'undefined' || options.emitFile) {
|
|
80
|
+
const assetInfo = {};
|
|
81
|
+
|
|
82
|
+
if (typeof name === 'string') {
|
|
83
|
+
let normalizedName = name;
|
|
84
|
+
const idx = normalizedName.indexOf('?');
|
|
85
|
+
|
|
86
|
+
if (idx >= 0) {
|
|
87
|
+
normalizedName = normalizedName.substr(0, idx);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const isImmutable = /\[([^:\]]+:)?(hash|contenthash)(:[^\]]+)?]/gi.test(normalizedName);
|
|
91
|
+
|
|
92
|
+
if (isImmutable === true) {
|
|
93
|
+
assetInfo.immutable = true;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
assetInfo.sourceFilename = (0, _utils.normalizePath)(_path.default.relative(this.rootContext, this.resourcePath));
|
|
98
|
+
this.emitFile(outputPath, content, null, assetInfo);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const esModule = typeof options.esModule !== 'undefined' ? options.esModule : true;
|
|
102
|
+
return `${esModule ? 'export default' : 'module.exports ='} ${publicPath};`;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const raw = true;
|
|
106
|
+
exports.raw = raw;
|
|
107
|
+
|
|
108
|
+
/***/ }),
|
|
109
|
+
|
|
110
|
+
/***/ 318:
|
|
111
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
116
|
+
value: true
|
|
117
|
+
}));
|
|
118
|
+
exports.normalizePath = normalizePath;
|
|
119
|
+
|
|
120
|
+
function normalizePath(path, stripTrailing) {
|
|
121
|
+
if (path === '\\' || path === '/') {
|
|
122
|
+
return '/';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const len = path.length;
|
|
126
|
+
|
|
127
|
+
if (len <= 1) {
|
|
128
|
+
return path;
|
|
129
|
+
} // ensure that win32 namespaces has two leading slashes, so that the path is
|
|
130
|
+
// handled properly by the win32 version of path.parse() after being normalized
|
|
131
|
+
// https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
let prefix = '';
|
|
135
|
+
|
|
136
|
+
if (len > 4 && path[3] === '\\') {
|
|
137
|
+
// eslint-disable-next-line prefer-destructuring
|
|
138
|
+
const ch = path[2];
|
|
139
|
+
|
|
140
|
+
if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
|
|
141
|
+
// eslint-disable-next-line no-param-reassign
|
|
142
|
+
path = path.slice(2);
|
|
143
|
+
prefix = '//';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const segs = path.split(/[/\\]+/);
|
|
148
|
+
|
|
149
|
+
if (stripTrailing !== false && segs[segs.length - 1] === '') {
|
|
150
|
+
segs.pop();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return prefix + segs.join('/');
|
|
154
|
+
} // eslint-disable-next-line import/prefer-default-export
|
|
155
|
+
|
|
156
|
+
/***/ }),
|
|
157
|
+
|
|
158
|
+
/***/ 14:
|
|
159
|
+
/***/ ((module) => {
|
|
160
|
+
|
|
161
|
+
module.exports = require("./schema-utils");
|
|
162
|
+
|
|
163
|
+
/***/ }),
|
|
164
|
+
|
|
165
|
+
/***/ 72:
|
|
166
|
+
/***/ ((module) => {
|
|
167
|
+
|
|
168
|
+
module.exports = require("@rsbuild/shared/loader-utils2");
|
|
169
|
+
|
|
170
|
+
/***/ }),
|
|
171
|
+
|
|
172
|
+
/***/ 17:
|
|
173
|
+
/***/ ((module) => {
|
|
174
|
+
|
|
175
|
+
module.exports = require("path");
|
|
176
|
+
|
|
177
|
+
/***/ }),
|
|
178
|
+
|
|
179
|
+
/***/ 284:
|
|
180
|
+
/***/ ((module) => {
|
|
181
|
+
|
|
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"}');
|
|
183
|
+
|
|
184
|
+
/***/ })
|
|
185
|
+
|
|
186
|
+
/******/ });
|
|
187
|
+
/************************************************************************/
|
|
188
|
+
/******/ // The module cache
|
|
189
|
+
/******/ var __webpack_module_cache__ = {};
|
|
190
|
+
/******/
|
|
191
|
+
/******/ // The require function
|
|
192
|
+
/******/ function __nccwpck_require__(moduleId) {
|
|
193
|
+
/******/ // Check if module is in cache
|
|
194
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
195
|
+
/******/ if (cachedModule !== undefined) {
|
|
196
|
+
/******/ return cachedModule.exports;
|
|
197
|
+
/******/ }
|
|
198
|
+
/******/ // Create a new module (and put it into the cache)
|
|
199
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
200
|
+
/******/ // no module.id needed
|
|
201
|
+
/******/ // no module.loaded needed
|
|
202
|
+
/******/ exports: {}
|
|
203
|
+
/******/ };
|
|
204
|
+
/******/
|
|
205
|
+
/******/ // Execute the module function
|
|
206
|
+
/******/ var threw = true;
|
|
207
|
+
/******/ try {
|
|
208
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
|
|
209
|
+
/******/ threw = false;
|
|
210
|
+
/******/ } finally {
|
|
211
|
+
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
|
212
|
+
/******/ }
|
|
213
|
+
/******/
|
|
214
|
+
/******/ // Return the exports of the module
|
|
215
|
+
/******/ return module.exports;
|
|
216
|
+
/******/ }
|
|
217
|
+
/******/
|
|
218
|
+
/************************************************************************/
|
|
219
|
+
/******/ /* webpack/runtime/compat */
|
|
220
|
+
/******/
|
|
221
|
+
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
|
222
|
+
/******/
|
|
223
|
+
/************************************************************************/
|
|
224
|
+
/******/
|
|
225
|
+
/******/ // startup
|
|
226
|
+
/******/ // Load entry module and return exports
|
|
227
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
228
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(43);
|
|
229
|
+
/******/ module.exports = __webpack_exports__;
|
|
230
|
+
/******/
|
|
231
|
+
/******/ })()
|
|
232
|
+
;
|
|
@@ -1 +1,281 @@
|
|
|
1
|
-
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ 219:
|
|
6
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const loader = __nccwpck_require__(401);
|
|
11
|
+
|
|
12
|
+
module.exports = loader.default;
|
|
13
|
+
module.exports.raw = loader.raw;
|
|
14
|
+
|
|
15
|
+
/***/ }),
|
|
16
|
+
|
|
17
|
+
/***/ 401:
|
|
18
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
23
|
+
value: true
|
|
24
|
+
}));
|
|
25
|
+
exports["default"] = loader;
|
|
26
|
+
exports.raw = void 0;
|
|
27
|
+
|
|
28
|
+
var _path = _interopRequireDefault(__nccwpck_require__(17));
|
|
29
|
+
|
|
30
|
+
var _loaderUtils = __nccwpck_require__(72);
|
|
31
|
+
|
|
32
|
+
var _schemaUtils = __nccwpck_require__(14);
|
|
33
|
+
|
|
34
|
+
var _mimeTypes = _interopRequireDefault(__nccwpck_require__(31));
|
|
35
|
+
|
|
36
|
+
var _normalizeFallback = _interopRequireDefault(__nccwpck_require__(547));
|
|
37
|
+
|
|
38
|
+
var _options = _interopRequireDefault(__nccwpck_require__(81));
|
|
39
|
+
|
|
40
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
|
+
|
|
42
|
+
function shouldTransform(limit, size) {
|
|
43
|
+
if (typeof limit === 'boolean') {
|
|
44
|
+
return limit;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (typeof limit === 'string') {
|
|
48
|
+
return size <= parseInt(limit, 10);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (typeof limit === 'number') {
|
|
52
|
+
return size <= limit;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function getMimetype(mimetype, resourcePath) {
|
|
59
|
+
if (typeof mimetype === 'boolean') {
|
|
60
|
+
if (mimetype) {
|
|
61
|
+
const resolvedMimeType = _mimeTypes.default.contentType(_path.default.extname(resourcePath));
|
|
62
|
+
|
|
63
|
+
if (!resolvedMimeType) {
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return resolvedMimeType.replace(/;\s+charset/i, ';charset');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return '';
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (typeof mimetype === 'string') {
|
|
74
|
+
return mimetype;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const resolvedMimeType = _mimeTypes.default.contentType(_path.default.extname(resourcePath));
|
|
78
|
+
|
|
79
|
+
if (!resolvedMimeType) {
|
|
80
|
+
return '';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return resolvedMimeType.replace(/;\s+charset/i, ';charset');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function getEncoding(encoding) {
|
|
87
|
+
if (typeof encoding === 'boolean') {
|
|
88
|
+
return encoding ? 'base64' : '';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (typeof encoding === 'string') {
|
|
92
|
+
return encoding;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return 'base64';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getEncodedData(generator, mimetype, encoding, content, resourcePath) {
|
|
99
|
+
if (generator) {
|
|
100
|
+
return generator(content, mimetype, encoding, resourcePath);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return `data:${mimetype}${encoding ? `;${encoding}` : ''},${content.toString( // eslint-disable-next-line no-undefined
|
|
104
|
+
encoding || undefined)}`;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function loader(content) {
|
|
108
|
+
// Loader Options
|
|
109
|
+
const options = (0, _loaderUtils.getOptions)(this) || {};
|
|
110
|
+
(0, _schemaUtils.validate)(_options.default, options, {
|
|
111
|
+
name: 'URL Loader',
|
|
112
|
+
baseDataPath: 'options'
|
|
113
|
+
}); // No limit or within the specified limit
|
|
114
|
+
|
|
115
|
+
if (shouldTransform(options.limit, content.length)) {
|
|
116
|
+
const {
|
|
117
|
+
resourcePath
|
|
118
|
+
} = this;
|
|
119
|
+
const mimetype = getMimetype(options.mimetype, resourcePath);
|
|
120
|
+
const encoding = getEncoding(options.encoding);
|
|
121
|
+
|
|
122
|
+
if (typeof content === 'string') {
|
|
123
|
+
// eslint-disable-next-line no-param-reassign
|
|
124
|
+
content = Buffer.from(content);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const encodedData = getEncodedData(options.generator, mimetype, encoding, content, resourcePath);
|
|
128
|
+
const esModule = typeof options.esModule !== 'undefined' ? options.esModule : true;
|
|
129
|
+
return `${esModule ? 'export default' : 'module.exports ='} ${JSON.stringify(encodedData)}`;
|
|
130
|
+
} // Normalize the fallback.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
const {
|
|
134
|
+
loader: fallbackLoader,
|
|
135
|
+
options: fallbackOptions
|
|
136
|
+
} = (0, _normalizeFallback.default)(options.fallback, options); // Require the fallback.
|
|
137
|
+
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
138
|
+
|
|
139
|
+
const fallback = require(fallbackLoader); // Call the fallback, passing a copy of the loader context. The copy has the query replaced. This way, the fallback
|
|
140
|
+
// loader receives the query which was intended for it instead of the query which was intended for url-loader.
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
const fallbackLoaderContext = Object.assign({}, this, {
|
|
144
|
+
query: fallbackOptions
|
|
145
|
+
});
|
|
146
|
+
return fallback.call(fallbackLoaderContext, content);
|
|
147
|
+
} // Loader Mode
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
const raw = true;
|
|
151
|
+
exports.raw = raw;
|
|
152
|
+
|
|
153
|
+
/***/ }),
|
|
154
|
+
|
|
155
|
+
/***/ 547:
|
|
156
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
161
|
+
value: true
|
|
162
|
+
}));
|
|
163
|
+
exports["default"] = normalizeFallback;
|
|
164
|
+
|
|
165
|
+
var _loaderUtils = _interopRequireDefault(__nccwpck_require__(72));
|
|
166
|
+
|
|
167
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
168
|
+
|
|
169
|
+
function normalizeFallback(fallback, originalOptions) {
|
|
170
|
+
let loader = 'file-loader';
|
|
171
|
+
let options = {};
|
|
172
|
+
|
|
173
|
+
if (typeof fallback === 'string') {
|
|
174
|
+
loader = fallback;
|
|
175
|
+
const index = fallback.indexOf('?');
|
|
176
|
+
|
|
177
|
+
if (index >= 0) {
|
|
178
|
+
loader = fallback.substr(0, index);
|
|
179
|
+
options = _loaderUtils.default.parseQuery(fallback.substr(index));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (fallback !== null && typeof fallback === 'object') {
|
|
184
|
+
({
|
|
185
|
+
loader,
|
|
186
|
+
options
|
|
187
|
+
} = fallback);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
options = Object.assign({}, originalOptions, options);
|
|
191
|
+
delete options.fallback;
|
|
192
|
+
return {
|
|
193
|
+
loader,
|
|
194
|
+
options
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/***/ }),
|
|
199
|
+
|
|
200
|
+
/***/ 14:
|
|
201
|
+
/***/ ((module) => {
|
|
202
|
+
|
|
203
|
+
module.exports = require("./schema-utils");
|
|
204
|
+
|
|
205
|
+
/***/ }),
|
|
206
|
+
|
|
207
|
+
/***/ 72:
|
|
208
|
+
/***/ ((module) => {
|
|
209
|
+
|
|
210
|
+
module.exports = require("@rsbuild/shared/loader-utils2");
|
|
211
|
+
|
|
212
|
+
/***/ }),
|
|
213
|
+
|
|
214
|
+
/***/ 31:
|
|
215
|
+
/***/ ((module) => {
|
|
216
|
+
|
|
217
|
+
module.exports = require("@rsbuild/shared/mime-types");
|
|
218
|
+
|
|
219
|
+
/***/ }),
|
|
220
|
+
|
|
221
|
+
/***/ 17:
|
|
222
|
+
/***/ ((module) => {
|
|
223
|
+
|
|
224
|
+
module.exports = require("path");
|
|
225
|
+
|
|
226
|
+
/***/ }),
|
|
227
|
+
|
|
228
|
+
/***/ 81:
|
|
229
|
+
/***/ ((module) => {
|
|
230
|
+
|
|
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}');
|
|
232
|
+
|
|
233
|
+
/***/ })
|
|
234
|
+
|
|
235
|
+
/******/ });
|
|
236
|
+
/************************************************************************/
|
|
237
|
+
/******/ // The module cache
|
|
238
|
+
/******/ var __webpack_module_cache__ = {};
|
|
239
|
+
/******/
|
|
240
|
+
/******/ // The require function
|
|
241
|
+
/******/ function __nccwpck_require__(moduleId) {
|
|
242
|
+
/******/ // Check if module is in cache
|
|
243
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
244
|
+
/******/ if (cachedModule !== undefined) {
|
|
245
|
+
/******/ return cachedModule.exports;
|
|
246
|
+
/******/ }
|
|
247
|
+
/******/ // Create a new module (and put it into the cache)
|
|
248
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
249
|
+
/******/ // no module.id needed
|
|
250
|
+
/******/ // no module.loaded needed
|
|
251
|
+
/******/ exports: {}
|
|
252
|
+
/******/ };
|
|
253
|
+
/******/
|
|
254
|
+
/******/ // Execute the module function
|
|
255
|
+
/******/ var threw = true;
|
|
256
|
+
/******/ try {
|
|
257
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
|
|
258
|
+
/******/ threw = false;
|
|
259
|
+
/******/ } finally {
|
|
260
|
+
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
|
261
|
+
/******/ }
|
|
262
|
+
/******/
|
|
263
|
+
/******/ // Return the exports of the module
|
|
264
|
+
/******/ return module.exports;
|
|
265
|
+
/******/ }
|
|
266
|
+
/******/
|
|
267
|
+
/************************************************************************/
|
|
268
|
+
/******/ /* webpack/runtime/compat */
|
|
269
|
+
/******/
|
|
270
|
+
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
|
271
|
+
/******/
|
|
272
|
+
/************************************************************************/
|
|
273
|
+
/******/
|
|
274
|
+
/******/ // startup
|
|
275
|
+
/******/ // Load entry module and return exports
|
|
276
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
277
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(219);
|
|
278
|
+
/******/ module.exports = __webpack_exports__;
|
|
279
|
+
/******/
|
|
280
|
+
/******/ })()
|
|
281
|
+
;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-svgr",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "svgr plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,20 +26,20 @@
|
|
|
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.6.
|
|
30
|
-
"@rsbuild/shared": "0.6.
|
|
29
|
+
"@rsbuild/plugin-react": "0.6.9",
|
|
30
|
+
"@rsbuild/shared": "0.6.9"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "18.x",
|
|
34
34
|
"file-loader": "6.2.0",
|
|
35
|
-
"prebundle": "1.0
|
|
35
|
+
"prebundle": "1.1.0",
|
|
36
36
|
"typescript": "^5.4.2",
|
|
37
37
|
"url-loader": "4.1.1",
|
|
38
|
-
"@rsbuild/core": "0.6.
|
|
39
|
-
"@scripts/test-helper": "0.6.
|
|
38
|
+
"@rsbuild/core": "0.6.9",
|
|
39
|
+
"@scripts/test-helper": "0.6.9"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@rsbuild/core": "^0.6.
|
|
42
|
+
"@rsbuild/core": "^0.6.9"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public",
|