File tree Expand file tree Collapse file tree 3 files changed +41
-9
lines changed
Expand file tree Collapse file tree 3 files changed +41
-9
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,39 @@ export const composeAssetConfig = (
1111 return {
1212 output : {
1313 dataUriLimit : 0 , // default: no inline asset
14- // assetPrefix: 'auto', // TODO: will turn on this with js support together in the future
14+ assetPrefix : 'auto' , // TODO: will turn on this with js support together in the future
15+ } ,
16+ tools : {
17+ // rspack: {
18+ // module: {
19+ // generator: {
20+ // asset: {
21+ // // publicPath: 'auto',
22+ // // experimentalLibPreserveImport: true,
23+ // },
24+ // },
25+ // },
26+ // },
1527 } ,
1628 } ;
1729 }
18-
30+ // TODO: bundleless
1931 return {
2032 output : {
2133 dataUriLimit : 0 , // default: no inline asset
22- // assetPrefix: 'auto', // TODO: will turn on this with js support together in the future
34+ assetPrefix : 'auto' ,
35+ } ,
36+ tools : {
37+ // rspack: {
38+ // module: {
39+ // generator: {
40+ // asset: {
41+ // // publicPath: 'auto',
42+ // // experimentalLibReExport: true,
43+ // },
44+ // },
45+ // },
46+ // },
2347 } ,
2448 } ;
2549 }
Original file line number Diff line number Diff line change @@ -909,9 +909,12 @@ const composeEntryConfig = async (
909909 } ) ;
910910
911911 // Filter the glob resolved entry files based on the allowed extensions
912- const resolvedEntryFiles = globEntryFiles . filter ( ( file ) =>
913- ENTRY_EXTENSIONS_PATTERN . test ( file ) ,
914- ) ;
912+ const resolvedEntryFiles = globEntryFiles ;
913+ ENTRY_EXTENSIONS_PATTERN ;
914+
915+ // .filter((file) =>
916+ // ENTRY_EXTENSIONS_PATTERN.test(file),
917+ // );
915918
916919 if ( resolvedEntryFiles . length === 0 ) {
917920 throw new Error ( `Cannot find ${ resolvedEntryFiles } ` ) ;
@@ -1053,7 +1056,10 @@ const composeBundlelessExternalConfig = (
10531056 ) ;
10541057 } else {
10551058 // If it does not match jsExtensionsPattern, we should do nothing, eg: ./foo.png
1056- return callback ( ) ;
1059+ resolvedRequest = resolvedRequest . replace (
1060+ / \. [ ^ . ] + $ / ,
1061+ jsExtension ,
1062+ ) ;
10571063 }
10581064 } else {
10591065 resolvedRequest = `${ resolvedRequest } ${ jsExtension } ` ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { RSLIB_CSS_ENTRY_FLAG } from './cssConfig';
33import {
44 ABSOLUTE_PUBLIC_PATH ,
55 AUTO_PUBLIC_PATH ,
6+ // BASE_URI,
67 SINGLE_DOT_PATH_SEGMENT ,
78} from './libCssExtractLoader' ;
89import { getUndoPath } from './utils' ;
@@ -62,14 +63,15 @@ class LibCssExtractPlugin implements Rspack.RspackPluginInstance {
6263 }
6364 }
6465
65- replace ( ABSOLUTE_PUBLIC_PATH , '' ) ;
6666 replace ( SINGLE_DOT_PATH_SEGMENT , '.' ) ;
6767 const undoPath = getUndoPath (
6868 name ,
6969 compilation . outputOptions . path ! ,
7070 false ,
7171 ) ;
72- replace ( AUTO_PUBLIC_PATH , undoPath ) ;
72+ replace ( `${ ABSOLUTE_PUBLIC_PATH } ${ AUTO_PUBLIC_PATH } ` , undoPath ) ;
73+ replace ( ABSOLUTE_PUBLIC_PATH , '' ) ;
74+ // replace(`${BASE_URI}/`, undoPath);
7375
7476 return replaceSource ;
7577 } ) ;
You can’t perform that action at this time.
0 commit comments