@lynx-js/rspeedy-canary 0.10.0-canary-20250704-bf2a43a3 → 0.10.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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.10.0
|
|
3
|
+
## 0.10.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -20,28 +20,28 @@
|
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
22
|
type InlineChunkTestFunction = (params: {
|
|
23
|
-
size: number
|
|
24
|
-
name: string
|
|
25
|
-
}) => boolean
|
|
23
|
+
size: number
|
|
24
|
+
name: string
|
|
25
|
+
}) => boolean
|
|
26
26
|
|
|
27
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
27
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
28
28
|
|
|
29
29
|
type InlineChunkConfig =
|
|
30
30
|
| boolean
|
|
31
31
|
| InlineChunkTest
|
|
32
|
-
| { enable?: boolean |
|
|
32
|
+
| { enable?: boolean | 'auto', test: InlineChunkTest }
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
```ts
|
|
36
|
-
import { defineConfig } from
|
|
36
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
37
37
|
|
|
38
38
|
export default defineConfig({
|
|
39
39
|
output: {
|
|
40
40
|
inlineScripts: ({ name, size }) => {
|
|
41
|
-
return name.includes(
|
|
41
|
+
return name.includes('foo') && size < 1000
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
|
-
})
|
|
44
|
+
})
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
example:
|
|
85
85
|
|
|
86
86
|
```js
|
|
87
|
-
import { defineConfig } from
|
|
87
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
88
88
|
|
|
89
89
|
export default defineConfig({
|
|
90
90
|
output: {
|
|
91
91
|
inlineScripts: false,
|
|
92
92
|
},
|
|
93
|
-
})
|
|
93
|
+
})
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
example:
|
|
111
111
|
|
|
112
112
|
```js
|
|
113
|
-
import { defineConfig } from
|
|
113
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
114
114
|
export default defineConfig({
|
|
115
115
|
source: {
|
|
116
|
-
preEntry:
|
|
116
|
+
preEntry: './src/polyfill.ts',
|
|
117
117
|
},
|
|
118
|
-
})
|
|
118
|
+
})
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -126,17 +126,17 @@
|
|
|
126
126
|
|
|
127
127
|
```js
|
|
128
128
|
export const myPlugin = {
|
|
129
|
-
name:
|
|
129
|
+
name: 'my-plugin',
|
|
130
130
|
setup(api) {
|
|
131
|
-
const { callerName } = api.context
|
|
131
|
+
const { callerName } = api.context
|
|
132
132
|
|
|
133
|
-
if (callerName ===
|
|
133
|
+
if (callerName === 'rslib') {
|
|
134
134
|
// ...
|
|
135
|
-
} else if (callerName ===
|
|
135
|
+
} else if (callerName === 'rspeedy') {
|
|
136
136
|
// ...
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
-
}
|
|
139
|
+
}
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
160
160
|
|
|
161
161
|
```js
|
|
162
|
-
import { defineConfig } from
|
|
162
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
163
163
|
|
|
164
164
|
export default defineConfig({
|
|
165
165
|
tools: {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
},
|
|
171
171
|
},
|
|
172
|
-
})
|
|
172
|
+
})
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -301,12 +301,12 @@
|
|
|
301
301
|
example:
|
|
302
302
|
|
|
303
303
|
```js
|
|
304
|
-
import { defineConfig } from
|
|
304
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
305
305
|
export default defineConfig({
|
|
306
306
|
server: {
|
|
307
|
-
base:
|
|
307
|
+
base: '/dist',
|
|
308
308
|
},
|
|
309
|
-
})
|
|
309
|
+
})
|
|
310
310
|
```
|
|
311
311
|
|
|
312
312
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -359,11 +359,11 @@
|
|
|
359
359
|
You can switch to other tools by using:
|
|
360
360
|
|
|
361
361
|
```js
|
|
362
|
-
import { defineConfig } from
|
|
362
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
363
363
|
import {
|
|
364
364
|
CssMinimizerWebpackPlugin,
|
|
365
365
|
pluginCssMinimizer,
|
|
366
|
-
} from
|
|
366
|
+
} from '@rsbuild/plugin-css-minimizer'
|
|
367
367
|
|
|
368
368
|
export default defineConfig({
|
|
369
369
|
plugins: [
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
},
|
|
377
377
|
}),
|
|
378
378
|
],
|
|
379
|
-
})
|
|
379
|
+
})
|
|
380
380
|
```
|
|
381
381
|
|
|
382
382
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -386,8 +386,8 @@
|
|
|
386
386
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
387
387
|
|
|
388
388
|
```js
|
|
389
|
-
import { defineConfig } from
|
|
390
|
-
import { pluginCssMinimizer } from
|
|
389
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
390
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
391
391
|
|
|
392
392
|
export default defineConfig({
|
|
393
393
|
plugins: [
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
},
|
|
400
400
|
}),
|
|
401
401
|
],
|
|
402
|
-
})
|
|
402
|
+
})
|
|
403
403
|
```
|
|
404
404
|
|
|
405
405
|
## 0.7.1
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
You may turn it off using `output.minify.css: false`:
|
|
420
420
|
|
|
421
421
|
```js
|
|
422
|
-
import { defineConfig } from
|
|
422
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
423
423
|
|
|
424
424
|
export default defineConfig({
|
|
425
425
|
output: {
|
|
@@ -427,18 +427,18 @@
|
|
|
427
427
|
css: false,
|
|
428
428
|
},
|
|
429
429
|
},
|
|
430
|
-
})
|
|
430
|
+
})
|
|
431
431
|
```
|
|
432
432
|
|
|
433
433
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
434
434
|
|
|
435
435
|
```js
|
|
436
|
-
import { defineConfig } from
|
|
437
|
-
import { pluginCssMinimizer } from
|
|
436
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
437
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
438
438
|
|
|
439
439
|
export default defineConfig({
|
|
440
440
|
plugins: [pluginCssMinimizer()],
|
|
441
|
-
})
|
|
441
|
+
})
|
|
442
442
|
```
|
|
443
443
|
|
|
444
444
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -465,22 +465,22 @@
|
|
|
465
465
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
466
466
|
|
|
467
467
|
```js
|
|
468
|
-
import { defineConfig } from
|
|
468
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
469
469
|
|
|
470
470
|
export default defineConfig({
|
|
471
471
|
dev: {
|
|
472
472
|
watchFiles: [
|
|
473
473
|
{
|
|
474
|
-
type:
|
|
475
|
-
paths: [
|
|
474
|
+
type: 'reload-server',
|
|
475
|
+
paths: ['public/**/*.txt'],
|
|
476
476
|
},
|
|
477
477
|
{
|
|
478
|
-
type:
|
|
479
|
-
paths: [
|
|
478
|
+
type: 'reload-page',
|
|
479
|
+
paths: ['public/**/*.json'],
|
|
480
480
|
},
|
|
481
481
|
],
|
|
482
482
|
},
|
|
483
|
-
})
|
|
483
|
+
})
|
|
484
484
|
```
|
|
485
485
|
|
|
486
486
|
- 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.
|
|
115
|
+
i8: "0.10.0"
|
|
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.
|
|
43
|
+
i8: "0.10.0"
|
|
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.
|
|
13
|
+
i8: "0.10.0"
|
|
14
14
|
};
|
|
15
15
|
const version = package_namespaceObject.i8;
|
|
16
16
|
const rspackVersion = core_.rspack.rspackVersion;
|