Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 29 additions & 30 deletions src/content/configuration/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,37 +235,36 @@ Compile entrypoints and dynamic `import`s only when they are in use. It can be u

```ts
{
// define a custom backend
backend?: ((
compiler: Compiler,
callback: (err?: Error, api?: BackendApi) => void
// define a custom backend
backend?: ((
compiler: Compiler,
callback: (err?: Error, api?: BackendApi) => void
) => void)
| ((compiler: Compiler) => Promise<BackendApi>)
| {
/**
* A custom client.
*/
client?: string;

/**
* Specify where to listen to from the server.
*/
listen?: number | ListenOptions | ((server: Server) => void);

/**
* Specify the protocol the client should use to connect to the server.
*/
protocol?: "http" | "https";

/**
* Specify how to create the server handling the EventSource requests.
*/
server?: ServerOptionsImport | ServerOptionsHttps | (() => Server);

},
entries?: boolean,
imports?: boolean,
test?: string | RegExp | ((module: Module) => boolean)
| ((compiler: Compiler) => Promise<BackendApi>)
| {
/**
* A custom client.
*/
client?: string;

/**
* Specify where to listen to from the server.
*/
listen?: number | ListenOptions | ((server: Server) => void);

/**
* Specify the protocol the client should use to connect to the server.
*/
protocol?: "http" | "https";

/**
* Specify how to create the server handling the EventSource requests.
*/
server?: ServerOptionsImport | ServerOptionsHttps | (() => Server);
},
entries?: boolean,
imports?: boolean,
test?: string | RegExp | ((module: Module) => boolean)
}
```

Expand Down
24 changes: 12 additions & 12 deletions src/content/configuration/module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -760,20 +760,20 @@ A [`Condition`](#condition) that allows you to match the child compiler name.
```javascript
module.exports = {
// ...
name: "compiler"
name: 'compiler',
module: {
rules: [
{
test: /a\.js$/,
compiler: "compiler", // Matches the "compiler" name, loader will be applied
use: "./loader"
},
{
test: /b\.js$/,
compiler: "other-compiler", // Does not match the "compiler" name, loader will NOT be applied
use: "./loader"
}
]
{
test: /a\.js$/,
compiler: 'compiler', // Matches the "compiler" name, loader will be applied
use: './loader',
},
{
test: /b\.js$/,
compiler: 'other-compiler', // Does not match the "compiler" name, loader will NOT be applied
use: './loader',
},
],
},
};
```
Expand Down