@lynx-js/rspeedy-canary 0.13.0-canary-20260111-9646114b → 0.13.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 +56 -56
- package/dist/1~src_version_ts.js +1 -1
- package/dist/src_index_ts.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.13.0
|
|
3
|
+
## 0.13.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
### Patch Changes
|
|
20
20
|
|
|
21
21
|
- Updated dependencies []:
|
|
22
|
-
- @lynx-js/web-rsbuild-server-middleware@0.19.5
|
|
22
|
+
- @lynx-js/web-rsbuild-server-middleware@0.19.5
|
|
23
23
|
|
|
24
24
|
## 0.12.5
|
|
25
25
|
|
|
@@ -149,11 +149,11 @@
|
|
|
149
149
|
- Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
|
|
150
150
|
|
|
151
151
|
```js
|
|
152
|
-
import { defineConfig } from
|
|
152
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
153
153
|
|
|
154
154
|
export default defineConfig(({ command, env }) => {
|
|
155
|
-
const isBuild = command ===
|
|
156
|
-
const isTest = env ===
|
|
155
|
+
const isBuild = command === 'build'
|
|
156
|
+
const isTest = env === 'test'
|
|
157
157
|
|
|
158
158
|
return {
|
|
159
159
|
output: {
|
|
@@ -162,8 +162,8 @@
|
|
|
162
162
|
performance: {
|
|
163
163
|
buildCache: isBuild,
|
|
164
164
|
},
|
|
165
|
-
}
|
|
166
|
-
})
|
|
165
|
+
}
|
|
166
|
+
})
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
- Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
|
|
@@ -171,30 +171,30 @@
|
|
|
171
171
|
This is useful when having multiple duplicated packages in the bundle:
|
|
172
172
|
|
|
173
173
|
```js
|
|
174
|
-
import { defineConfig } from
|
|
174
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
175
175
|
|
|
176
176
|
export default defineConfig({
|
|
177
177
|
resolve: {
|
|
178
|
-
dedupe: [
|
|
178
|
+
dedupe: ['tslib'],
|
|
179
179
|
},
|
|
180
|
-
})
|
|
180
|
+
})
|
|
181
181
|
```
|
|
182
182
|
|
|
183
183
|
- Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
|
|
184
184
|
|
|
185
185
|
```js
|
|
186
|
-
import { defineConfig } from
|
|
186
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
187
187
|
|
|
188
188
|
export default defineConfig({
|
|
189
189
|
resolve: {
|
|
190
190
|
alias: {
|
|
191
|
-
|
|
191
|
+
'@': './src',
|
|
192
192
|
},
|
|
193
193
|
// 'prefer-tsconfig' (default): tsconfig.json paths take priority
|
|
194
194
|
// 'prefer-alias': resolve.alias takes priority
|
|
195
|
-
aliasStrategy:
|
|
195
|
+
aliasStrategy: 'prefer-alias',
|
|
196
196
|
},
|
|
197
|
-
})
|
|
197
|
+
})
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
- Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
- Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
|
|
215
215
|
|
|
216
216
|
```js
|
|
217
|
-
import { defineConfig } from
|
|
217
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
218
218
|
|
|
219
219
|
export default defineConfig({
|
|
220
220
|
output: {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
media: 0,
|
|
224
224
|
},
|
|
225
225
|
},
|
|
226
|
-
})
|
|
226
|
+
})
|
|
227
227
|
```
|
|
228
228
|
|
|
229
229
|
## 0.11.0
|
|
@@ -343,28 +343,28 @@
|
|
|
343
343
|
|
|
344
344
|
```ts
|
|
345
345
|
type InlineChunkTestFunction = (params: {
|
|
346
|
-
size: number
|
|
347
|
-
name: string
|
|
348
|
-
}) => boolean
|
|
346
|
+
size: number
|
|
347
|
+
name: string
|
|
348
|
+
}) => boolean
|
|
349
349
|
|
|
350
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
350
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
351
351
|
|
|
352
352
|
type InlineChunkConfig =
|
|
353
353
|
| boolean
|
|
354
354
|
| InlineChunkTest
|
|
355
|
-
| { enable?: boolean |
|
|
355
|
+
| { enable?: boolean | 'auto', test: InlineChunkTest }
|
|
356
356
|
```
|
|
357
357
|
|
|
358
358
|
```ts
|
|
359
|
-
import { defineConfig } from
|
|
359
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
360
360
|
|
|
361
361
|
export default defineConfig({
|
|
362
362
|
output: {
|
|
363
363
|
inlineScripts: ({ name, size }) => {
|
|
364
|
-
return name.includes(
|
|
364
|
+
return name.includes('foo') && size < 1000
|
|
365
365
|
},
|
|
366
366
|
},
|
|
367
|
-
})
|
|
367
|
+
})
|
|
368
368
|
```
|
|
369
369
|
|
|
370
370
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -407,13 +407,13 @@
|
|
|
407
407
|
example:
|
|
408
408
|
|
|
409
409
|
```js
|
|
410
|
-
import { defineConfig } from
|
|
410
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
411
411
|
|
|
412
412
|
export default defineConfig({
|
|
413
413
|
output: {
|
|
414
414
|
inlineScripts: false,
|
|
415
415
|
},
|
|
416
|
-
})
|
|
416
|
+
})
|
|
417
417
|
```
|
|
418
418
|
|
|
419
419
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -433,12 +433,12 @@
|
|
|
433
433
|
example:
|
|
434
434
|
|
|
435
435
|
```js
|
|
436
|
-
import { defineConfig } from
|
|
436
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
437
437
|
export default defineConfig({
|
|
438
438
|
source: {
|
|
439
|
-
preEntry:
|
|
439
|
+
preEntry: './src/polyfill.ts',
|
|
440
440
|
},
|
|
441
|
-
})
|
|
441
|
+
})
|
|
442
442
|
```
|
|
443
443
|
|
|
444
444
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -449,17 +449,17 @@
|
|
|
449
449
|
|
|
450
450
|
```js
|
|
451
451
|
export const myPlugin = {
|
|
452
|
-
name:
|
|
452
|
+
name: 'my-plugin',
|
|
453
453
|
setup(api) {
|
|
454
|
-
const { callerName } = api.context
|
|
454
|
+
const { callerName } = api.context
|
|
455
455
|
|
|
456
|
-
if (callerName ===
|
|
456
|
+
if (callerName === 'rslib') {
|
|
457
457
|
// ...
|
|
458
|
-
} else if (callerName ===
|
|
458
|
+
} else if (callerName === 'rspeedy') {
|
|
459
459
|
// ...
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
|
-
}
|
|
462
|
+
}
|
|
463
463
|
```
|
|
464
464
|
|
|
465
465
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
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
|
tools: {
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
},
|
|
493
493
|
},
|
|
494
494
|
},
|
|
495
|
-
})
|
|
495
|
+
})
|
|
496
496
|
```
|
|
497
497
|
|
|
498
498
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -624,12 +624,12 @@
|
|
|
624
624
|
example:
|
|
625
625
|
|
|
626
626
|
```js
|
|
627
|
-
import { defineConfig } from
|
|
627
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
628
628
|
export default defineConfig({
|
|
629
629
|
server: {
|
|
630
|
-
base:
|
|
630
|
+
base: '/dist',
|
|
631
631
|
},
|
|
632
|
-
})
|
|
632
|
+
})
|
|
633
633
|
```
|
|
634
634
|
|
|
635
635
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -682,11 +682,11 @@
|
|
|
682
682
|
You can switch to other tools by using:
|
|
683
683
|
|
|
684
684
|
```js
|
|
685
|
-
import { defineConfig } from
|
|
685
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
686
686
|
import {
|
|
687
687
|
CssMinimizerWebpackPlugin,
|
|
688
688
|
pluginCssMinimizer,
|
|
689
|
-
} from
|
|
689
|
+
} from '@rsbuild/plugin-css-minimizer'
|
|
690
690
|
|
|
691
691
|
export default defineConfig({
|
|
692
692
|
plugins: [
|
|
@@ -699,7 +699,7 @@
|
|
|
699
699
|
},
|
|
700
700
|
}),
|
|
701
701
|
],
|
|
702
|
-
})
|
|
702
|
+
})
|
|
703
703
|
```
|
|
704
704
|
|
|
705
705
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -709,8 +709,8 @@
|
|
|
709
709
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
710
710
|
|
|
711
711
|
```js
|
|
712
|
-
import { defineConfig } from
|
|
713
|
-
import { pluginCssMinimizer } from
|
|
712
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
713
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
714
714
|
|
|
715
715
|
export default defineConfig({
|
|
716
716
|
plugins: [
|
|
@@ -722,7 +722,7 @@
|
|
|
722
722
|
},
|
|
723
723
|
}),
|
|
724
724
|
],
|
|
725
|
-
})
|
|
725
|
+
})
|
|
726
726
|
```
|
|
727
727
|
|
|
728
728
|
## 0.7.1
|
|
@@ -742,7 +742,7 @@
|
|
|
742
742
|
You may turn it off using `output.minify.css: false`:
|
|
743
743
|
|
|
744
744
|
```js
|
|
745
|
-
import { defineConfig } from
|
|
745
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
746
746
|
|
|
747
747
|
export default defineConfig({
|
|
748
748
|
output: {
|
|
@@ -750,18 +750,18 @@
|
|
|
750
750
|
css: false,
|
|
751
751
|
},
|
|
752
752
|
},
|
|
753
|
-
})
|
|
753
|
+
})
|
|
754
754
|
```
|
|
755
755
|
|
|
756
756
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
757
757
|
|
|
758
758
|
```js
|
|
759
|
-
import { defineConfig } from
|
|
760
|
-
import { pluginCssMinimizer } from
|
|
759
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
760
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
761
761
|
|
|
762
762
|
export default defineConfig({
|
|
763
763
|
plugins: [pluginCssMinimizer()],
|
|
764
|
-
})
|
|
764
|
+
})
|
|
765
765
|
```
|
|
766
766
|
|
|
767
767
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -788,22 +788,22 @@
|
|
|
788
788
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
789
789
|
|
|
790
790
|
```js
|
|
791
|
-
import { defineConfig } from
|
|
791
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
792
792
|
|
|
793
793
|
export default defineConfig({
|
|
794
794
|
dev: {
|
|
795
795
|
watchFiles: [
|
|
796
796
|
{
|
|
797
|
-
type:
|
|
798
|
-
paths: [
|
|
797
|
+
type: 'reload-server',
|
|
798
|
+
paths: ['public/**/*.txt'],
|
|
799
799
|
},
|
|
800
800
|
{
|
|
801
|
-
type:
|
|
802
|
-
paths: [
|
|
801
|
+
type: 'reload-page',
|
|
802
|
+
paths: ['public/**/*.json'],
|
|
803
803
|
},
|
|
804
804
|
],
|
|
805
805
|
},
|
|
806
|
-
})
|
|
806
|
+
})
|
|
807
807
|
```
|
|
808
808
|
|
|
809
809
|
- be9b003: Add `source.exclude`.
|
package/dist/1~src_version_ts.js
CHANGED
package/dist/src_index_ts.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/rspeedy-canary",
|
|
3
|
-
"version": "0.13.0
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "A webpack/rspack-based frontend toolchain for Lynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@lynx-js/cache-events-webpack-plugin": "npm:@lynx-js/cache-events-webpack-plugin-canary@0.0.2",
|
|
52
52
|
"@lynx-js/chunk-loading-webpack-plugin": "npm:@lynx-js/chunk-loading-webpack-plugin-canary@0.3.3",
|
|
53
|
-
"@lynx-js/web-rsbuild-server-middleware": "npm:@lynx-js/web-rsbuild-server-middleware-canary@0.19.5
|
|
53
|
+
"@lynx-js/web-rsbuild-server-middleware": "npm:@lynx-js/web-rsbuild-server-middleware-canary@0.19.5",
|
|
54
54
|
"@lynx-js/webpack-dev-transport": "npm:@lynx-js/webpack-dev-transport-canary@0.2.0",
|
|
55
55
|
"@lynx-js/websocket": "npm:@lynx-js/websocket-canary@0.0.4",
|
|
56
56
|
"@rsbuild/core": "1.7.1",
|