rspack-plugin-svg-sprite 1.3.0 → 1.4.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/LICENSE +1 -1
- package/README.md +150 -2
- package/client.d.ts +13 -0
- package/dist/rsbuild.d.ts +12 -0
- package/dist/rsbuild.d.ts.map +1 -0
- package/dist/rsbuild.js +70 -0
- package/dist/rsbuild.js.map +1 -0
- package/package.json +24 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -7,16 +7,25 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/rspack-plugin-svg-sprite)
|
|
8
8
|
[](https://www.npmjs.com/package/rspack-plugin-svg-sprite)
|
|
9
9
|
[](https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/blob/main/LICENSE)
|
|
10
|
+
[](https://bundlephobia.com/package/rspack-plugin-svg-sprite)
|
|
10
11
|
|
|
11
|
-
**[Live Demo](https://yichenzhu1337.github.io/rspack-plugin-svg-sprite/)**
|
|
12
|
+
**[Live Demo](https://yichenzhu1337.github.io/rspack-plugin-svg-sprite/)** | **[npm](https://www.npmjs.com/package/rspack-plugin-svg-sprite)** | **[npm trends](https://npmtrends.com/rspack-plugin-svg-sprite-vs-svg-sprite-loader)**
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install rspack-plugin-svg-sprite -D
|
|
16
|
+
```
|
|
12
17
|
|
|
13
18
|
---
|
|
14
19
|
|
|
20
|
+
## Why SVG sprites?
|
|
21
|
+
|
|
22
|
+
Individual SVG files mean one HTTP request per icon — 50 icons = 50 requests. Inlining SVGs directly into JSX bloats your bundle with duplicated markup. SVG sprites solve both problems: all icons are combined into a single file (or a single hidden DOM element), and each icon is referenced by `<use href="#id" />` — one request, zero duplication, full CSS styling support, and resolution-independent rendering at any size.
|
|
23
|
+
|
|
15
24
|
## What is this?
|
|
16
25
|
|
|
17
26
|
`rspack-plugin-svg-sprite` lets you import `.svg` files in your Rspack (or Webpack 5) project and automatically combine them into an SVG sprite sheet — either inlined in the DOM or extracted as an external `.svg` file.
|
|
18
27
|
|
|
19
|
-
It was created because the popular [`svg-sprite-loader`](https://github.com/JetBrains/svg-sprite-loader) depends on internal Webpack APIs (`NormalModule.getCompilationHooks`, `compilation.hooks.additionalAssets`, etc.) that do not exist in Rspack. This package reimplements the same functionality using Rspack-compatible APIs while keeping the exact same exported symbol shape (`id`, `viewBox`, `url`, `content`), so your existing component code works without changes.
|
|
28
|
+
It was created because the popular [`svg-sprite-loader`](https://github.com/JetBrains/svg-sprite-loader) depends on internal Webpack APIs (`NormalModule.getCompilationHooks`, `compilation.hooks.additionalAssets`, etc.) that do not exist in Rspack ([rspack#11609](https://github.com/web-infra-dev/rspack/issues/11609)). This package reimplements the same functionality using Rspack-compatible APIs while keeping the exact same exported symbol shape (`id`, `viewBox`, `url`, `content`), so your existing component code works without changes.
|
|
20
29
|
|
|
21
30
|
## Features
|
|
22
31
|
|
|
@@ -34,6 +43,10 @@ It was created because the popular [`svg-sprite-loader`](https://github.com/JetB
|
|
|
34
43
|
|
|
35
44
|
```bash
|
|
36
45
|
npm install rspack-plugin-svg-sprite -D
|
|
46
|
+
# or
|
|
47
|
+
pnpm add rspack-plugin-svg-sprite -D
|
|
48
|
+
# or
|
|
49
|
+
yarn add rspack-plugin-svg-sprite -D
|
|
37
50
|
```
|
|
38
51
|
|
|
39
52
|
### Configure (inline mode)
|
|
@@ -74,6 +87,42 @@ import logo from './logo.svg';
|
|
|
74
87
|
|
|
75
88
|
That's it. Every imported SVG is automatically registered as a `<symbol>` in a hidden sprite and referenced by `#id`.
|
|
76
89
|
|
|
90
|
+
### TypeScript
|
|
91
|
+
|
|
92
|
+
This package ships with a client type declaration. Add it to your `tsconfig.json` so `import icon from './icon.svg'` is fully typed:
|
|
93
|
+
|
|
94
|
+
```jsonc
|
|
95
|
+
// tsconfig.json
|
|
96
|
+
{
|
|
97
|
+
"compilerOptions": {
|
|
98
|
+
"types": ["rspack-plugin-svg-sprite/client"],
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
This gives you autocompletion for `id`, `viewBox`, `url`, and `content` on every SVG import.
|
|
104
|
+
|
|
105
|
+
<details>
|
|
106
|
+
<summary>Alternative: manual declaration file</summary>
|
|
107
|
+
|
|
108
|
+
If you prefer, create a `svg.d.ts` file instead:
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
declare module '*.svg' {
|
|
112
|
+
const symbol: {
|
|
113
|
+
id: string;
|
|
114
|
+
viewBox: string;
|
|
115
|
+
url: string;
|
|
116
|
+
content: string;
|
|
117
|
+
};
|
|
118
|
+
export default symbol;
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Make sure this file is included by your `tsconfig.json` (e.g., in the `include` array or alongside your source files).
|
|
123
|
+
|
|
124
|
+
</details>
|
|
125
|
+
|
|
77
126
|
## Extract Mode
|
|
78
127
|
|
|
79
128
|
To emit SVGs as an external `.svg` sprite file instead of inlining them, enable extract mode and add the plugin:
|
|
@@ -151,6 +200,86 @@ Every `import icon from './icon.svg'` returns an object with:
|
|
|
151
200
|
|
|
152
201
|
This matches `svg-sprite-loader`'s export shape exactly, so migrating requires no component changes.
|
|
153
202
|
|
|
203
|
+
## Rsbuild Integration
|
|
204
|
+
|
|
205
|
+
If you're using [Rsbuild](https://rsbuild.dev/), use the built-in Rsbuild plugin for one-line setup:
|
|
206
|
+
|
|
207
|
+
```js
|
|
208
|
+
// rsbuild.config.js
|
|
209
|
+
const { pluginSvgSprite } = require('rspack-plugin-svg-sprite/rsbuild');
|
|
210
|
+
|
|
211
|
+
module.exports = {
|
|
212
|
+
plugins: [
|
|
213
|
+
pluginSvgSprite({
|
|
214
|
+
symbolId: 'icon-[name]',
|
|
215
|
+
extract: true,
|
|
216
|
+
spriteFilename: 'sprites/icons.svg',
|
|
217
|
+
}),
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The Rsbuild plugin handles the loader rule, `type: 'javascript/auto'`, and the `SvgSpritePlugin` automatically.
|
|
223
|
+
|
|
224
|
+
## Framework Recipes
|
|
225
|
+
|
|
226
|
+
### Next.js (with next-rspack)
|
|
227
|
+
|
|
228
|
+
```js
|
|
229
|
+
// next.config.js
|
|
230
|
+
const { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');
|
|
231
|
+
|
|
232
|
+
module.exports = {
|
|
233
|
+
webpack(config) {
|
|
234
|
+
// Remove Next.js default SVG handling
|
|
235
|
+
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg'));
|
|
236
|
+
if (fileLoaderRule) fileLoaderRule.exclude = /\.svg$/;
|
|
237
|
+
|
|
238
|
+
config.module.rules.push({
|
|
239
|
+
test: /\.svg$/,
|
|
240
|
+
type: 'javascript/auto',
|
|
241
|
+
loader: 'rspack-plugin-svg-sprite/loader',
|
|
242
|
+
options: { symbolId: 'icon-[name]', extract: true },
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
config.plugins.push(new SvgSpritePlugin({ plainSprite: true }));
|
|
246
|
+
return config;
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Vue + Rspack
|
|
252
|
+
|
|
253
|
+
```js
|
|
254
|
+
// rspack.config.js
|
|
255
|
+
const { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');
|
|
256
|
+
|
|
257
|
+
module.exports = {
|
|
258
|
+
module: {
|
|
259
|
+
rules: [
|
|
260
|
+
{
|
|
261
|
+
test: /\.svg$/,
|
|
262
|
+
type: 'javascript/auto',
|
|
263
|
+
loader: 'rspack-plugin-svg-sprite/loader',
|
|
264
|
+
options: { symbolId: '[name]' },
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
```vue
|
|
272
|
+
<template>
|
|
273
|
+
<svg :viewBox="icon.viewBox">
|
|
274
|
+
<use :href="icon.url" />
|
|
275
|
+
</svg>
|
|
276
|
+
</template>
|
|
277
|
+
|
|
278
|
+
<script setup>
|
|
279
|
+
import icon from './icon.svg';
|
|
280
|
+
</script>
|
|
281
|
+
```
|
|
282
|
+
|
|
154
283
|
## Migrating from svg-sprite-loader
|
|
155
284
|
|
|
156
285
|
```diff
|
|
@@ -236,6 +365,25 @@ module.exports = {
|
|
|
236
365
|
2. During Rspack's `processAssets` stage, the plugin collects all registered symbols and emits a combined `.svg` sprite file.
|
|
237
366
|
3. The exported JS module contains the external file URL (e.g., `/sprites/icons.svg#symbolId`).
|
|
238
367
|
|
|
368
|
+
## Alternatives & Comparison
|
|
369
|
+
|
|
370
|
+
Looking for the right SVG solution for Rspack? Here's how the options compare:
|
|
371
|
+
|
|
372
|
+
| Feature | rspack-plugin-svg-sprite | svg-sprite-loader | @svgr/webpack | @rsbuild/plugin-svgr | vite-plugin-svg-icons |
|
|
373
|
+
| --------------------- | ------------------------ | --------------------------- | ---------------- | -------------------- | --------------------- |
|
|
374
|
+
| **Rspack support** | Native | No (uses Webpack internals) | Via config | Rsbuild only | No (Vite only) |
|
|
375
|
+
| **Approach** | SVG sprites (`<use>`) | SVG sprites (`<use>`) | React components | React components | SVG sprites |
|
|
376
|
+
| **Inline mode** | Yes | Yes | N/A | N/A | Yes |
|
|
377
|
+
| **Extract mode** | Yes | Yes | N/A | N/A | No |
|
|
378
|
+
| **Webpack 5 support** | Yes | Yes | Yes | No | No |
|
|
379
|
+
| **Runtime deps** | Zero | 1 | Several | Several | Several |
|
|
380
|
+
| **Maintained** | Yes | No (archived) | Yes | Yes | Yes |
|
|
381
|
+
| **Drop-in migration** | — | Yes (same API) | Different API | Different API | Different API |
|
|
382
|
+
|
|
383
|
+
**When to use SVG sprites** (this plugin): You want icons combined into a single file with `<use href="#id">` references — optimal for large icon sets, full CSS styling control, and caching. Best when migrating from `svg-sprite-loader`.
|
|
384
|
+
|
|
385
|
+
**When to use SVGR**: You want each SVG as a React component with props for color, size, etc. Better for SVGs that need dynamic manipulation via React props rather than CSS.
|
|
386
|
+
|
|
239
387
|
## Compatibility
|
|
240
388
|
|
|
241
389
|
| Bundler | Version | Status |
|
package/client.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare module '*.svg' {
|
|
2
|
+
const symbol: {
|
|
3
|
+
/** The symbol ID inside the sprite (e.g., "icon-home") */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The original SVG viewBox attribute (e.g., "0 0 24 24") */
|
|
6
|
+
viewBox: string;
|
|
7
|
+
/** Fragment reference (inline: "#icon-home") or full URL (extract: "/sprites/icons.svg#icon-home") */
|
|
8
|
+
url: string;
|
|
9
|
+
/** Raw `<symbol>` markup */
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default symbol;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
2
|
+
export interface SvgSpritePluginOptions {
|
|
3
|
+
symbolId?: string | ((resourcePath: string) => string);
|
|
4
|
+
extract?: boolean;
|
|
5
|
+
esModule?: boolean;
|
|
6
|
+
spriteFilename?: string;
|
|
7
|
+
publicPath?: string;
|
|
8
|
+
plainSprite?: boolean;
|
|
9
|
+
spriteAttrs?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export declare function pluginSvgSprite(options?: SvgSpritePluginOptions): RsbuildPlugin;
|
|
12
|
+
//# sourceMappingURL=rsbuild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsbuild.d.ts","sourceRoot":"","sources":["../src/rsbuild.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,aAAa,CA6BnF"}
|
package/dist/rsbuild.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.pluginSvgSprite = pluginSvgSprite;
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const plugin_1 = __importDefault(require("./plugin"));
|
|
42
|
+
function pluginSvgSprite(options = {}) {
|
|
43
|
+
const { plainSprite, spriteAttrs, ...loaderOptions } = options;
|
|
44
|
+
return {
|
|
45
|
+
name: 'rsbuild-plugin-svg-sprite',
|
|
46
|
+
setup(api) {
|
|
47
|
+
api.modifyRspackConfig((config) => {
|
|
48
|
+
config.module = config.module || {};
|
|
49
|
+
config.module.rules = config.module.rules || [];
|
|
50
|
+
config.module.rules.push({
|
|
51
|
+
test: /\.svg$/,
|
|
52
|
+
type: 'javascript/auto',
|
|
53
|
+
loader: path.join(__dirname, 'loader.js'),
|
|
54
|
+
options: {
|
|
55
|
+
symbolId: loaderOptions.symbolId || '[name]',
|
|
56
|
+
extract: loaderOptions.extract || false,
|
|
57
|
+
esModule: loaderOptions.esModule !== false,
|
|
58
|
+
spriteFilename: loaderOptions.spriteFilename || 'sprite.svg',
|
|
59
|
+
publicPath: loaderOptions.publicPath || '',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
if (loaderOptions.extract) {
|
|
63
|
+
config.plugins = config.plugins || [];
|
|
64
|
+
config.plugins.push(new plugin_1.default({ plainSprite, spriteAttrs }));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=rsbuild.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsbuild.js","sourceRoot":"","sources":["../src/rsbuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,0CA6BC;AA3CD,2CAA6B;AAE7B,sDAAuC;AAYvC,SAAgB,eAAe,CAAC,UAAkC,EAAE;IAClE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC;IAE/D,OAAO;QACL,IAAI,EAAE,2BAA2B;QACjC,KAAK,CAAC,GAAG;YACP,GAAG,CAAC,kBAAkB,CAAC,CAAC,MAAM,EAAE,EAAE;gBAChC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;gBACpC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;gBAChD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;oBACvB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,iBAA0B;oBAChC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC;oBACzC,OAAO,EAAE;wBACP,QAAQ,EAAE,aAAa,CAAC,QAAQ,IAAI,QAAQ;wBAC5C,OAAO,EAAE,aAAa,CAAC,OAAO,IAAI,KAAK;wBACvC,QAAQ,EAAE,aAAa,CAAC,QAAQ,KAAK,KAAK;wBAC1C,cAAc,EAAE,aAAa,CAAC,cAAc,IAAI,YAAY;wBAC5D,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,EAAE;qBAC3C;iBACF,CAAC,CAAC;gBAEH,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;oBAC1B,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;oBACtC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,gBAAe,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rspack-plugin-svg-sprite",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support",
|
|
5
5
|
"author": "Yichen Zhu",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,20 +16,29 @@
|
|
|
16
16
|
"rspack",
|
|
17
17
|
"rspack-plugin",
|
|
18
18
|
"rspack-loader",
|
|
19
|
+
"rsbuild",
|
|
20
|
+
"rsbuild-plugin",
|
|
19
21
|
"svg",
|
|
20
22
|
"svg-sprite",
|
|
21
23
|
"svg-sprite-loader",
|
|
22
24
|
"svg-icon",
|
|
25
|
+
"svg-icons",
|
|
23
26
|
"sprite",
|
|
24
27
|
"sprite-sheet",
|
|
25
28
|
"icon",
|
|
29
|
+
"icon-system",
|
|
26
30
|
"loader",
|
|
27
31
|
"plugin",
|
|
32
|
+
"bundler-plugin",
|
|
28
33
|
"webpack",
|
|
29
34
|
"webpack5",
|
|
30
35
|
"extract",
|
|
31
36
|
"inline",
|
|
32
|
-
"symbol"
|
|
37
|
+
"symbol",
|
|
38
|
+
"react",
|
|
39
|
+
"vue",
|
|
40
|
+
"migration",
|
|
41
|
+
"drop-in"
|
|
33
42
|
],
|
|
34
43
|
"main": "dist/index.js",
|
|
35
44
|
"types": "dist/index.d.ts",
|
|
@@ -53,10 +62,18 @@
|
|
|
53
62
|
"./runtime/symbol": {
|
|
54
63
|
"types": "./dist/runtime/symbol.d.ts",
|
|
55
64
|
"default": "./dist/runtime/symbol.js"
|
|
65
|
+
},
|
|
66
|
+
"./rsbuild": {
|
|
67
|
+
"types": "./dist/rsbuild.d.ts",
|
|
68
|
+
"default": "./dist/rsbuild.js"
|
|
69
|
+
},
|
|
70
|
+
"./client": {
|
|
71
|
+
"types": "./client.d.ts"
|
|
56
72
|
}
|
|
57
73
|
},
|
|
58
74
|
"files": [
|
|
59
75
|
"dist/",
|
|
76
|
+
"client.d.ts",
|
|
60
77
|
"README.md",
|
|
61
78
|
"LICENSE"
|
|
62
79
|
],
|
|
@@ -75,11 +92,15 @@
|
|
|
75
92
|
"prepare": "husky"
|
|
76
93
|
},
|
|
77
94
|
"peerDependencies": {
|
|
78
|
-
"@rspack/core": ">=0.5.0"
|
|
95
|
+
"@rspack/core": ">=0.5.0",
|
|
96
|
+
"@rsbuild/core": ">=1.0.0"
|
|
79
97
|
},
|
|
80
98
|
"peerDependenciesMeta": {
|
|
81
99
|
"@rspack/core": {
|
|
82
100
|
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"@rsbuild/core": {
|
|
103
|
+
"optional": true
|
|
83
104
|
}
|
|
84
105
|
},
|
|
85
106
|
"devDependencies": {
|