rsbuild-plugin-react-router 0.6.1 → 0.6.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/dist/index.cjs +9 -2
- package/dist/index.js +9 -2
- package/package.json +1 -1
- package/src/mode-plan.ts +10 -0
package/dist/index.cjs
CHANGED
|
@@ -15709,11 +15709,18 @@ export {
|
|
|
15709
15709
|
library: {
|
|
15710
15710
|
type: 'module'
|
|
15711
15711
|
},
|
|
15712
|
-
module: !0
|
|
15712
|
+
module: !0,
|
|
15713
|
+
...isBuild ? {
|
|
15714
|
+
chunkFilename: 'static/js/async/[id]-[contenthash:16].js'
|
|
15715
|
+
} : {}
|
|
15713
15716
|
},
|
|
15714
15717
|
webOptimization: {
|
|
15715
15718
|
avoidEntryIife: !0,
|
|
15716
|
-
runtimeChunk: 'single'
|
|
15719
|
+
runtimeChunk: 'single',
|
|
15720
|
+
...isBuild ? {
|
|
15721
|
+
mangleExports: 'size',
|
|
15722
|
+
usedExports: 'global'
|
|
15723
|
+
} : {}
|
|
15717
15724
|
},
|
|
15718
15725
|
nodeExternals: Array.from(new Set([
|
|
15719
15726
|
'express',
|
package/dist/index.js
CHANGED
|
@@ -9924,11 +9924,18 @@ export {
|
|
|
9924
9924
|
library: {
|
|
9925
9925
|
type: 'module'
|
|
9926
9926
|
},
|
|
9927
|
-
module: !0
|
|
9927
|
+
module: !0,
|
|
9928
|
+
...isBuild ? {
|
|
9929
|
+
chunkFilename: 'static/js/async/[id]-[contenthash:16].js'
|
|
9930
|
+
} : {}
|
|
9928
9931
|
},
|
|
9929
9932
|
webOptimization: {
|
|
9930
9933
|
avoidEntryIife: !0,
|
|
9931
|
-
runtimeChunk: 'single'
|
|
9934
|
+
runtimeChunk: 'single',
|
|
9935
|
+
...isBuild ? {
|
|
9936
|
+
mangleExports: 'size',
|
|
9937
|
+
usedExports: 'global'
|
|
9938
|
+
} : {}
|
|
9932
9939
|
},
|
|
9933
9940
|
nodeExternals: Array.from(new Set([
|
|
9934
9941
|
'express',
|
package/package.json
CHANGED
package/src/mode-plan.ts
CHANGED
|
@@ -345,10 +345,20 @@ const createClassicModePlan = async ({
|
|
|
345
345
|
wasmLoading: 'fetch',
|
|
346
346
|
library: { type: 'module' },
|
|
347
347
|
module: true,
|
|
348
|
+
// Async chunks are addressed by id at runtime, so the chunk name only
|
|
349
|
+
// adds bytes to the filename and to every place that references it.
|
|
350
|
+
...(isBuild
|
|
351
|
+
? { chunkFilename: 'static/js/async/[id]-[contenthash:16].js' }
|
|
352
|
+
: {}),
|
|
348
353
|
},
|
|
349
354
|
webOptimization: {
|
|
350
355
|
avoidEntryIife: true,
|
|
351
356
|
runtimeChunk: 'single',
|
|
357
|
+
// Classic mode resolves route modules through the browser manifest by
|
|
358
|
+
// chunk, not by export name, so production builds can mangle export
|
|
359
|
+
// names and drop exports nothing imports across the whole graph. RSC
|
|
360
|
+
// mode must keep every export name; see createRscModePlan.
|
|
361
|
+
...(isBuild ? { mangleExports: 'size', usedExports: 'global' } : {}),
|
|
352
362
|
},
|
|
353
363
|
nodeExternals: Array.from(
|
|
354
364
|
new Set(['express', ...getSsrExternals(process.cwd())])
|