File tree Expand file tree Collapse file tree 1 file changed +6
-24
lines changed Expand file tree Collapse file tree 1 file changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -26,27 +26,13 @@ export function createRspackConfig(
26
26
*/
27
27
context : esmx . root ,
28
28
entry : ( ( ) => {
29
- const importPaths : string [ ] = [ ] ;
30
- switch ( buildTarget ) {
31
- case 'client' :
32
- importPaths . push ( esmx . resolvePath ( 'src/entry.client.ts' ) ) ;
33
- isHot &&
34
- importPaths . push (
35
- `${ resolve ( 'webpack-hot-middleware/client' ) } ?path=${ esmx . basePath } hot-middleware&timeout=5000&overlay=false`
36
- ) ;
37
- break ;
38
- case 'server' :
39
- importPaths . push ( esmx . resolvePath ( 'src/entry.server.ts' ) ) ;
40
- break ;
41
- case 'node' :
42
- importPaths . push ( esmx . resolvePath ( 'src/entry.node.ts' ) ) ;
43
- break ;
29
+ if ( buildTarget === 'node' ) {
30
+ return {
31
+ [ `./src/entry.${ buildTarget } ` ] : {
32
+ import : esmx . resolvePath ( 'src/entry.node.ts' )
33
+ }
34
+ } ;
44
35
}
45
- return {
46
- [ `./src/entry.${ buildTarget } ` ] : {
47
- import : importPaths
48
- }
49
- } ;
50
36
} ) ( ) ,
51
37
output : {
52
38
clean : esmx . isProd ,
@@ -168,7 +154,3 @@ export function createRspackConfig(
168
154
cache : ! esmx . isProd
169
155
} ;
170
156
}
171
-
172
- function resolve ( name : string ) {
173
- return new URL ( import . meta. resolve ( name ) ) . pathname ;
174
- }
You can’t perform that action at this time.
0 commit comments