@lynx-js/rspeedy-canary 0.10.6-canary-20250809-c8ce6aa3 → 0.10.6
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.10.6
|
|
3
|
+
## 0.10.6
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -71,28 +71,28 @@
|
|
|
71
71
|
|
|
72
72
|
```ts
|
|
73
73
|
type InlineChunkTestFunction = (params: {
|
|
74
|
-
size: number
|
|
75
|
-
name: string
|
|
76
|
-
}) => boolean
|
|
74
|
+
size: number
|
|
75
|
+
name: string
|
|
76
|
+
}) => boolean
|
|
77
77
|
|
|
78
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
78
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
79
79
|
|
|
80
80
|
type InlineChunkConfig =
|
|
81
81
|
| boolean
|
|
82
82
|
| InlineChunkTest
|
|
83
|
-
| { enable?: boolean |
|
|
83
|
+
| { enable?: boolean | 'auto', test: InlineChunkTest }
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
```ts
|
|
87
|
-
import { defineConfig } from
|
|
87
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
88
88
|
|
|
89
89
|
export default defineConfig({
|
|
90
90
|
output: {
|
|
91
91
|
inlineScripts: ({ name, size }) => {
|
|
92
|
-
return name.includes(
|
|
92
|
+
return name.includes('foo') && size < 1000
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
|
-
})
|
|
95
|
+
})
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
example:
|
|
136
136
|
|
|
137
137
|
```js
|
|
138
|
-
import { defineConfig } from
|
|
138
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
139
139
|
|
|
140
140
|
export default defineConfig({
|
|
141
141
|
output: {
|
|
142
142
|
inlineScripts: false,
|
|
143
143
|
},
|
|
144
|
-
})
|
|
144
|
+
})
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -161,12 +161,12 @@
|
|
|
161
161
|
example:
|
|
162
162
|
|
|
163
163
|
```js
|
|
164
|
-
import { defineConfig } from
|
|
164
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
165
165
|
export default defineConfig({
|
|
166
166
|
source: {
|
|
167
|
-
preEntry:
|
|
167
|
+
preEntry: './src/polyfill.ts',
|
|
168
168
|
},
|
|
169
|
-
})
|
|
169
|
+
})
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -177,17 +177,17 @@
|
|
|
177
177
|
|
|
178
178
|
```js
|
|
179
179
|
export const myPlugin = {
|
|
180
|
-
name:
|
|
180
|
+
name: 'my-plugin',
|
|
181
181
|
setup(api) {
|
|
182
|
-
const { callerName } = api.context
|
|
182
|
+
const { callerName } = api.context
|
|
183
183
|
|
|
184
|
-
if (callerName ===
|
|
184
|
+
if (callerName === 'rslib') {
|
|
185
185
|
// ...
|
|
186
|
-
} else if (callerName ===
|
|
186
|
+
} else if (callerName === 'rspeedy') {
|
|
187
187
|
// ...
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
}
|
|
190
|
+
}
|
|
191
191
|
```
|
|
192
192
|
|
|
193
193
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
211
211
|
|
|
212
212
|
```js
|
|
213
|
-
import { defineConfig } from
|
|
213
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
214
214
|
|
|
215
215
|
export default defineConfig({
|
|
216
216
|
tools: {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
},
|
|
221
221
|
},
|
|
222
222
|
},
|
|
223
|
-
})
|
|
223
|
+
})
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -352,12 +352,12 @@
|
|
|
352
352
|
example:
|
|
353
353
|
|
|
354
354
|
```js
|
|
355
|
-
import { defineConfig } from
|
|
355
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
356
356
|
export default defineConfig({
|
|
357
357
|
server: {
|
|
358
|
-
base:
|
|
358
|
+
base: '/dist',
|
|
359
359
|
},
|
|
360
|
-
})
|
|
360
|
+
})
|
|
361
361
|
```
|
|
362
362
|
|
|
363
363
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -410,11 +410,11 @@
|
|
|
410
410
|
You can switch to other tools by using:
|
|
411
411
|
|
|
412
412
|
```js
|
|
413
|
-
import { defineConfig } from
|
|
413
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
414
414
|
import {
|
|
415
415
|
CssMinimizerWebpackPlugin,
|
|
416
416
|
pluginCssMinimizer,
|
|
417
|
-
} from
|
|
417
|
+
} from '@rsbuild/plugin-css-minimizer'
|
|
418
418
|
|
|
419
419
|
export default defineConfig({
|
|
420
420
|
plugins: [
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
},
|
|
428
428
|
}),
|
|
429
429
|
],
|
|
430
|
-
})
|
|
430
|
+
})
|
|
431
431
|
```
|
|
432
432
|
|
|
433
433
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -437,8 +437,8 @@
|
|
|
437
437
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
438
438
|
|
|
439
439
|
```js
|
|
440
|
-
import { defineConfig } from
|
|
441
|
-
import { pluginCssMinimizer } from
|
|
440
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
441
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
442
442
|
|
|
443
443
|
export default defineConfig({
|
|
444
444
|
plugins: [
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
},
|
|
451
451
|
}),
|
|
452
452
|
],
|
|
453
|
-
})
|
|
453
|
+
})
|
|
454
454
|
```
|
|
455
455
|
|
|
456
456
|
## 0.7.1
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
You may turn it off using `output.minify.css: false`:
|
|
471
471
|
|
|
472
472
|
```js
|
|
473
|
-
import { defineConfig } from
|
|
473
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
474
474
|
|
|
475
475
|
export default defineConfig({
|
|
476
476
|
output: {
|
|
@@ -478,18 +478,18 @@
|
|
|
478
478
|
css: false,
|
|
479
479
|
},
|
|
480
480
|
},
|
|
481
|
-
})
|
|
481
|
+
})
|
|
482
482
|
```
|
|
483
483
|
|
|
484
484
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
485
485
|
|
|
486
486
|
```js
|
|
487
|
-
import { defineConfig } from
|
|
488
|
-
import { pluginCssMinimizer } from
|
|
487
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
488
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
489
489
|
|
|
490
490
|
export default defineConfig({
|
|
491
491
|
plugins: [pluginCssMinimizer()],
|
|
492
|
-
})
|
|
492
|
+
})
|
|
493
493
|
```
|
|
494
494
|
|
|
495
495
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -516,22 +516,22 @@
|
|
|
516
516
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
517
517
|
|
|
518
518
|
```js
|
|
519
|
-
import { defineConfig } from
|
|
519
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
520
520
|
|
|
521
521
|
export default defineConfig({
|
|
522
522
|
dev: {
|
|
523
523
|
watchFiles: [
|
|
524
524
|
{
|
|
525
|
-
type:
|
|
526
|
-
paths: [
|
|
525
|
+
type: 'reload-server',
|
|
526
|
+
paths: ['public/**/*.txt'],
|
|
527
527
|
},
|
|
528
528
|
{
|
|
529
|
-
type:
|
|
530
|
-
paths: [
|
|
529
|
+
type: 'reload-page',
|
|
530
|
+
paths: ['public/**/*.json'],
|
|
531
531
|
},
|
|
532
532
|
],
|
|
533
533
|
},
|
|
534
|
-
})
|
|
534
|
+
})
|
|
535
535
|
```
|
|
536
536
|
|
|
537
537
|
- be9b003: Add `source.exclude`.
|
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ var __webpack_modules__ = {
|
|
|
112
112
|
});
|
|
113
113
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
114
114
|
var package_namespaceObject = {
|
|
115
|
-
i8: "0.10.
|
|
115
|
+
i8: "0.10.6"
|
|
116
116
|
};
|
|
117
117
|
const version = package_namespaceObject.i8;
|
|
118
118
|
const rspackVersion = core_.rspack.rspackVersion;
|
|
@@ -40,7 +40,7 @@ export const __webpack_modules__ = {
|
|
|
40
40
|
});
|
|
41
41
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
42
42
|
var package_namespaceObject = {
|
|
43
|
-
i8: "0.10.
|
|
43
|
+
i8: "0.10.6"
|
|
44
44
|
};
|
|
45
45
|
const version = package_namespaceObject.i8;
|
|
46
46
|
const rspackVersion = core_.rspack.rspackVersion;
|
|
@@ -19,11 +19,11 @@ export const __webpack_modules__ = {
|
|
|
19
19
|
config,
|
|
20
20
|
debug: _debug_js__WEBPACK_IMPORTED_MODULE_1__.fF,
|
|
21
21
|
async exit (code) {
|
|
22
|
-
const { exit } = await
|
|
22
|
+
const { exit } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./src/cli/exit.ts"));
|
|
23
23
|
return exit(code);
|
|
24
24
|
},
|
|
25
25
|
logger: _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger,
|
|
26
|
-
version: _version_js__WEBPACK_IMPORTED_MODULE_2__.
|
|
26
|
+
version: _version_js__WEBPACK_IMPORTED_MODULE_2__.version
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
};
|
|
@@ -7,10 +7,8 @@ export const __webpack_modules__ = {
|
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
8
|
pluginRsdoctor: ()=>pluginRsdoctor
|
|
9
9
|
});
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
13
|
-
}
|
|
10
|
+
var _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rsbuild/core");
|
|
11
|
+
var _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/is-ci.ts");
|
|
14
12
|
function pluginRsdoctor(options) {
|
|
15
13
|
return {
|
|
16
14
|
name: 'lynx:rsbuild:rsdoctor',
|
|
@@ -27,7 +25,7 @@ export const __webpack_modules__ = {
|
|
|
27
25
|
if (registered) continue;
|
|
28
26
|
config.plugins ??= [];
|
|
29
27
|
const defaultOptions = {
|
|
30
|
-
disableClientServer:
|
|
28
|
+
disableClientServer: (0, _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__.y)(),
|
|
31
29
|
supports: {
|
|
32
30
|
banner: true
|
|
33
31
|
},
|
|
@@ -42,12 +40,20 @@ export const __webpack_modules__ = {
|
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
};
|
|
45
|
-
config.plugins.push(new RsdoctorRspackPlugin((0,
|
|
43
|
+
config.plugins.push(new RsdoctorRspackPlugin((0, _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.mergeRsbuildConfig)(defaultOptions, options)));
|
|
46
44
|
}
|
|
47
|
-
|
|
45
|
+
_rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger.info("Rsdoctor is enabled.");
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
48
|
};
|
|
51
49
|
}
|
|
50
|
+
},
|
|
51
|
+
"./src/utils/is-ci.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
52
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
53
|
+
y: ()=>isCI
|
|
54
|
+
});
|
|
55
|
+
function isCI() {
|
|
56
|
+
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
};
|
package/dist/src_version_ts.js
CHANGED
|
@@ -10,7 +10,7 @@ export const __webpack_modules__ = {
|
|
|
10
10
|
});
|
|
11
11
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
12
12
|
var package_namespaceObject = {
|
|
13
|
-
i8: "0.10.
|
|
13
|
+
i8: "0.10.6"
|
|
14
14
|
};
|
|
15
15
|
const version = package_namespaceObject.i8;
|
|
16
16
|
const rspackVersion = core_.rspack.rspackVersion;
|