@lynx-js/rspeedy-canary 0.10.2-canary-20250718-df1b58dd → 0.10.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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.10.2
|
|
3
|
+
## 0.10.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -37,28 +37,28 @@
|
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
39
|
type InlineChunkTestFunction = (params: {
|
|
40
|
-
size: number
|
|
41
|
-
name: string
|
|
42
|
-
}) => boolean
|
|
40
|
+
size: number
|
|
41
|
+
name: string
|
|
42
|
+
}) => boolean
|
|
43
43
|
|
|
44
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
44
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
45
45
|
|
|
46
46
|
type InlineChunkConfig =
|
|
47
47
|
| boolean
|
|
48
48
|
| InlineChunkTest
|
|
49
|
-
| { enable?: boolean |
|
|
49
|
+
| { enable?: boolean | 'auto', test: InlineChunkTest }
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
```ts
|
|
53
|
-
import { defineConfig } from
|
|
53
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
54
54
|
|
|
55
55
|
export default defineConfig({
|
|
56
56
|
output: {
|
|
57
57
|
inlineScripts: ({ name, size }) => {
|
|
58
|
-
return name.includes(
|
|
58
|
+
return name.includes('foo') && size < 1000
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
|
-
})
|
|
61
|
+
})
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -101,13 +101,13 @@
|
|
|
101
101
|
example:
|
|
102
102
|
|
|
103
103
|
```js
|
|
104
|
-
import { defineConfig } from
|
|
104
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
105
105
|
|
|
106
106
|
export default defineConfig({
|
|
107
107
|
output: {
|
|
108
108
|
inlineScripts: false,
|
|
109
109
|
},
|
|
110
|
-
})
|
|
110
|
+
})
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -127,12 +127,12 @@
|
|
|
127
127
|
example:
|
|
128
128
|
|
|
129
129
|
```js
|
|
130
|
-
import { defineConfig } from
|
|
130
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
131
131
|
export default defineConfig({
|
|
132
132
|
source: {
|
|
133
|
-
preEntry:
|
|
133
|
+
preEntry: './src/polyfill.ts',
|
|
134
134
|
},
|
|
135
|
-
})
|
|
135
|
+
})
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -143,17 +143,17 @@
|
|
|
143
143
|
|
|
144
144
|
```js
|
|
145
145
|
export const myPlugin = {
|
|
146
|
-
name:
|
|
146
|
+
name: 'my-plugin',
|
|
147
147
|
setup(api) {
|
|
148
|
-
const { callerName } = api.context
|
|
148
|
+
const { callerName } = api.context
|
|
149
149
|
|
|
150
|
-
if (callerName ===
|
|
150
|
+
if (callerName === 'rslib') {
|
|
151
151
|
// ...
|
|
152
|
-
} else if (callerName ===
|
|
152
|
+
} else if (callerName === 'rspeedy') {
|
|
153
153
|
// ...
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
|
-
}
|
|
156
|
+
}
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
177
177
|
|
|
178
178
|
```js
|
|
179
|
-
import { defineConfig } from
|
|
179
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
180
180
|
|
|
181
181
|
export default defineConfig({
|
|
182
182
|
tools: {
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
},
|
|
187
187
|
},
|
|
188
188
|
},
|
|
189
|
-
})
|
|
189
|
+
})
|
|
190
190
|
```
|
|
191
191
|
|
|
192
192
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -318,12 +318,12 @@
|
|
|
318
318
|
example:
|
|
319
319
|
|
|
320
320
|
```js
|
|
321
|
-
import { defineConfig } from
|
|
321
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
322
322
|
export default defineConfig({
|
|
323
323
|
server: {
|
|
324
|
-
base:
|
|
324
|
+
base: '/dist',
|
|
325
325
|
},
|
|
326
|
-
})
|
|
326
|
+
})
|
|
327
327
|
```
|
|
328
328
|
|
|
329
329
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -376,11 +376,11 @@
|
|
|
376
376
|
You can switch to other tools by using:
|
|
377
377
|
|
|
378
378
|
```js
|
|
379
|
-
import { defineConfig } from
|
|
379
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
380
380
|
import {
|
|
381
381
|
CssMinimizerWebpackPlugin,
|
|
382
382
|
pluginCssMinimizer,
|
|
383
|
-
} from
|
|
383
|
+
} from '@rsbuild/plugin-css-minimizer'
|
|
384
384
|
|
|
385
385
|
export default defineConfig({
|
|
386
386
|
plugins: [
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
},
|
|
394
394
|
}),
|
|
395
395
|
],
|
|
396
|
-
})
|
|
396
|
+
})
|
|
397
397
|
```
|
|
398
398
|
|
|
399
399
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -403,8 +403,8 @@
|
|
|
403
403
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
404
404
|
|
|
405
405
|
```js
|
|
406
|
-
import { defineConfig } from
|
|
407
|
-
import { pluginCssMinimizer } from
|
|
406
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
407
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
408
408
|
|
|
409
409
|
export default defineConfig({
|
|
410
410
|
plugins: [
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
},
|
|
417
417
|
}),
|
|
418
418
|
],
|
|
419
|
-
})
|
|
419
|
+
})
|
|
420
420
|
```
|
|
421
421
|
|
|
422
422
|
## 0.7.1
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
You may turn it off using `output.minify.css: false`:
|
|
437
437
|
|
|
438
438
|
```js
|
|
439
|
-
import { defineConfig } from
|
|
439
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
440
440
|
|
|
441
441
|
export default defineConfig({
|
|
442
442
|
output: {
|
|
@@ -444,18 +444,18 @@
|
|
|
444
444
|
css: false,
|
|
445
445
|
},
|
|
446
446
|
},
|
|
447
|
-
})
|
|
447
|
+
})
|
|
448
448
|
```
|
|
449
449
|
|
|
450
450
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
451
451
|
|
|
452
452
|
```js
|
|
453
|
-
import { defineConfig } from
|
|
454
|
-
import { pluginCssMinimizer } from
|
|
453
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
454
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
455
455
|
|
|
456
456
|
export default defineConfig({
|
|
457
457
|
plugins: [pluginCssMinimizer()],
|
|
458
|
-
})
|
|
458
|
+
})
|
|
459
459
|
```
|
|
460
460
|
|
|
461
461
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -482,22 +482,22 @@
|
|
|
482
482
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
483
483
|
|
|
484
484
|
```js
|
|
485
|
-
import { defineConfig } from
|
|
485
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
486
486
|
|
|
487
487
|
export default defineConfig({
|
|
488
488
|
dev: {
|
|
489
489
|
watchFiles: [
|
|
490
490
|
{
|
|
491
|
-
type:
|
|
492
|
-
paths: [
|
|
491
|
+
type: 'reload-server',
|
|
492
|
+
paths: ['public/**/*.txt'],
|
|
493
493
|
},
|
|
494
494
|
{
|
|
495
|
-
type:
|
|
496
|
-
paths: [
|
|
495
|
+
type: 'reload-page',
|
|
496
|
+
paths: ['public/**/*.json'],
|
|
497
497
|
},
|
|
498
498
|
],
|
|
499
499
|
},
|
|
500
|
-
})
|
|
500
|
+
})
|
|
501
501
|
```
|
|
502
502
|
|
|
503
503
|
- 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.2"
|
|
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.2"
|
|
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 __webpack_require__.e("src_cli_exit_ts").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__.i8
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
};
|
|
@@ -7,8 +7,10 @@ export const __webpack_modules__ = {
|
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
8
|
pluginRsdoctor: ()=>pluginRsdoctor
|
|
9
9
|
});
|
|
10
|
-
var
|
|
11
|
-
|
|
10
|
+
var core_ = __webpack_require__("@rsbuild/core");
|
|
11
|
+
function isCI() {
|
|
12
|
+
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
13
|
+
}
|
|
12
14
|
function pluginRsdoctor(options) {
|
|
13
15
|
return {
|
|
14
16
|
name: 'lynx:rsbuild:rsdoctor',
|
|
@@ -25,7 +27,7 @@ export const __webpack_modules__ = {
|
|
|
25
27
|
if (registered) continue;
|
|
26
28
|
config.plugins ??= [];
|
|
27
29
|
const defaultOptions = {
|
|
28
|
-
disableClientServer: (
|
|
30
|
+
disableClientServer: isCI(),
|
|
29
31
|
supports: {
|
|
30
32
|
banner: true
|
|
31
33
|
},
|
|
@@ -40,20 +42,12 @@ export const __webpack_modules__ = {
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
|
-
config.plugins.push(new RsdoctorRspackPlugin((0,
|
|
45
|
+
config.plugins.push(new RsdoctorRspackPlugin((0, core_.mergeRsbuildConfig)(defaultOptions, options)));
|
|
44
46
|
}
|
|
45
|
-
|
|
47
|
+
core_.logger.info("Rsdoctor is enabled.");
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
51
|
}
|
|
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
|
-
}
|
|
58
52
|
}
|
|
59
53
|
};
|
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.2"
|
|
14
14
|
};
|
|
15
15
|
const version = package_namespaceObject.i8;
|
|
16
16
|
const rspackVersion = core_.rspack.rspackVersion;
|