11const express = require ( 'express' ) ;
2- const webpack = require ( '@rspack/core' ) ;
2+ const { rspack } = require ( '@rspack/core' ) ;
33const { createProxyMiddleware } = require ( 'http-proxy-middleware' ) ;
44const { RspackDevServer : Server } = require ( '@rspack/dev-server' ) ;
55const config = require ( '../fixtures/client-config/webpack.config' ) ;
@@ -16,7 +16,7 @@ describe('allowed hosts', () => {
1616 const proxyHost = devServerHost ;
1717 const proxyPort = port2 ;
1818
19- const compiler = webpack ( config ) ;
19+ const compiler = rspack ( config ) ;
2020 const devServerOptions = {
2121 client : {
2222 webSocketURL : {
@@ -89,7 +89,7 @@ describe('allowed hosts', () => {
8989 const proxyHost = devServerHost ;
9090 const proxyPort = port2 ;
9191
92- const compiler = webpack ( config ) ;
92+ const compiler = rspack ( config ) ;
9393 const devServerOptions = {
9494 client : {
9595 webSocketURL : {
@@ -162,7 +162,7 @@ describe('allowed hosts', () => {
162162 const proxyHost = devServerHost ;
163163 const proxyPort = port2 ;
164164
165- const compiler = webpack ( config ) ;
165+ const compiler = rspack ( config ) ;
166166 const devServerOptions = {
167167 client : {
168168 webSocketURL : {
@@ -235,7 +235,7 @@ describe('allowed hosts', () => {
235235 const proxyHost = devServerHost ;
236236 const proxyPort = port2 ;
237237
238- const compiler = webpack ( config ) ;
238+ const compiler = rspack ( config ) ;
239239 const devServerOptions = {
240240 client : {
241241 webSocketURL : {
@@ -309,7 +309,7 @@ describe('allowed hosts', () => {
309309 const proxyHost = devServerHost ;
310310 const proxyPort = port2 ;
311311
312- const compiler = webpack ( config ) ;
312+ const compiler = rspack ( config ) ;
313313 const devServerOptions = {
314314 client : {
315315 webSocketURL : {
@@ -384,7 +384,7 @@ describe('allowed hosts', () => {
384384 const proxyHost = IPv4 ;
385385 const proxyPort = port2 ;
386386
387- const compiler = webpack ( config ) ;
387+ const compiler = rspack ( config ) ;
388388 const devServerOptions = {
389389 client : {
390390 webSocketURL : {
@@ -458,7 +458,7 @@ describe('allowed hosts', () => {
458458 const proxyHost = devServerHost ;
459459 const proxyPort = port2 ;
460460
461- const compiler = webpack ( config ) ;
461+ const compiler = rspack ( config ) ;
462462 const devServerOptions = {
463463 client : {
464464 webSocketURL : {
@@ -535,7 +535,7 @@ describe('allowed hosts', () => {
535535 const proxyHost = devServerHost ;
536536 const proxyPort = port2 ;
537537
538- const compiler = webpack ( config ) ;
538+ const compiler = rspack ( config ) ;
539539 const devServerOptions = {
540540 client : {
541541 webSocketURL : {
@@ -612,7 +612,7 @@ describe('allowed hosts', () => {
612612 const proxyHost = devServerHost ;
613613 const proxyPort = port2 ;
614614
615- const compiler = webpack ( config ) ;
615+ const compiler = rspack ( config ) ;
616616 const devServerOptions = {
617617 client : {
618618 webSocketURL : {
@@ -690,7 +690,7 @@ describe('allowed hosts', () => {
690690 const proxyHost = devServerHost ;
691691 const proxyPort = port2 ;
692692
693- const compiler = webpack ( config ) ;
693+ const compiler = rspack ( config ) ;
694694 const devServerOptions = {
695695 client : {
696696 webSocketURL : {
@@ -768,7 +768,7 @@ describe('allowed hosts', () => {
768768 const proxyHost = devServerHost ;
769769 const proxyPort = port2 ;
770770
771- const compiler = webpack ( config ) ;
771+ const compiler = rspack ( config ) ;
772772 const devServerOptions = {
773773 client : {
774774 webSocketURL : {
@@ -846,7 +846,7 @@ describe('allowed hosts', () => {
846846 const proxyHost = devServerHost ;
847847 const proxyPort = port2 ;
848848
849- const compiler = webpack ( config ) ;
849+ const compiler = rspack ( config ) ;
850850 const devServerOptions = {
851851 client : {
852852 webSocketURL : {
@@ -924,7 +924,7 @@ describe('allowed hosts', () => {
924924 const proxyHost = devServerHost ;
925925 const proxyPort = port2 ;
926926
927- const compiler = webpack ( config ) ;
927+ const compiler = rspack ( config ) ;
928928 const devServerOptions = {
929929 client : {
930930 webSocketURL : {
@@ -1005,7 +1005,7 @@ describe('allowed hosts', () => {
10051005 const proxyHost = devServerHost ;
10061006 const proxyPort = port2 ;
10071007
1008- const compiler = webpack ( config ) ;
1008+ const compiler = rspack ( config ) ;
10091009 const devServerOptions = {
10101010 client : {
10111011 webSocketURL : {
@@ -1083,7 +1083,7 @@ describe('allowed hosts', () => {
10831083 const proxyHost = devServerHost ;
10841084 const proxyPort = port2 ;
10851085
1086- const compiler = webpack ( config ) ;
1086+ const compiler = rspack ( config ) ;
10871087 const devServerOptions = {
10881088 client : {
10891089 webSocketURL : {
@@ -1161,7 +1161,7 @@ describe('allowed hosts', () => {
11611161 const proxyHost = devServerHost ;
11621162 const proxyPort = port2 ;
11631163
1164- const compiler = webpack ( config ) ;
1164+ const compiler = rspack ( config ) ;
11651165 const devServerOptions = {
11661166 client : {
11671167 webSocketURL : {
@@ -1239,7 +1239,7 @@ describe('allowed hosts', () => {
12391239 const proxyHost = devServerHost ;
12401240 const proxyPort = port2 ;
12411241
1242- const compiler = webpack ( config ) ;
1242+ const compiler = rspack ( config ) ;
12431243 const devServerOptions = {
12441244 client : {
12451245 webSocketURL : {
@@ -1320,7 +1320,7 @@ describe('allowed hosts', () => {
13201320 const proxyHost = devServerHost ;
13211321 const proxyPort = port2 ;
13221322
1323- const compiler = webpack ( config ) ;
1323+ const compiler = rspack ( config ) ;
13241324 const devServerOptions = {
13251325 client : {
13261326 webSocketURL : {
@@ -1398,7 +1398,7 @@ describe('allowed hosts', () => {
13981398 const proxyHost = devServerHost ;
13991399 const proxyPort = port2 ;
14001400
1401- const compiler = webpack ( config ) ;
1401+ const compiler = rspack ( config ) ;
14021402 const devServerOptions = {
14031403 client : {
14041404 webSocketURL : {
@@ -1480,7 +1480,7 @@ describe('allowed hosts', () => {
14801480 const proxyHost = devServerHost ;
14811481 const proxyPort = port2 ;
14821482
1483- const compiler = webpack ( config ) ;
1483+ const compiler = rspack ( config ) ;
14841484 const devServerOptions = {
14851485 client : {
14861486 webSocketURL : {
@@ -1562,7 +1562,7 @@ describe('allowed hosts', () => {
15621562 let consoleMessages ;
15631563
15641564 beforeEach ( ( ) => {
1565- compiler = webpack ( config ) ;
1565+ compiler = rspack ( config ) ;
15661566 pageErrors = [ ] ;
15671567 consoleMessages = [ ] ;
15681568 } ) ;
0 commit comments