File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,12 @@ $ rspack serve -c ./your.config.js
7373While starting the development server, you can specify the configuration by the ` devServer ` field of your Rspack config file:
7474
7575``` js
76- // rspack.config.js
77- module . exports = {
76+ // rspack.config.mjs
77+ export default {
7878 // ...
7979 devServer: {
8080 // the configuration of the development server
81- port: 8080
81+ port: 8080 ,
8282 },
8383};
8484```
@@ -92,19 +92,19 @@ While it's recommended to run `@rspack/dev-server` via the CLI, you may also cho
9292``` js
9393import { RspackDevServer } from " @rspack/dev-server" ;
9494import rspack from " @rspack/core" ;
95- import rspackConfig from ' ./rspack.config.js ' ;
95+ import rspackConfig from " ./rspack.config.mjs " ;
9696
9797const compiler = rspack (rspackConfig);
9898const devServerOptions = {
9999 ... rspackConfig .devServer ,
100100 // override
101- port: 8888
101+ port: 8888 ,
102102};
103103
104104const server = new RspackDevServer (devServerOptions, compiler);
105105
106106server .startCallback (() => {
107- console .log (' Successfully started server on http://localhost:8888' );
107+ console .log (" Successfully started server on http://localhost:8888" );
108108});
109109```
110110
You can’t perform that action at this time.
0 commit comments