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
3 changes: 0 additions & 3 deletions packages/rspack/etc/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,6 @@ export type Experiments = {
incremental?: IncrementalPresets | Incremental;
futureDefaults?: boolean;
buildHttp?: HttpUriOptions;
parallelLoader?: boolean;
useInputFileSystem?: UseInputFileSystem;
nativeWatcher?: boolean;
inlineConst?: boolean;
Expand Down Expand Up @@ -2536,8 +2535,6 @@ export interface ExperimentsNormalized {
// (undocumented)
outputModule?: boolean;
// (undocumented)
parallelLoader?: boolean;
// (undocumented)
topLevelAwait?: boolean;
// (undocumented)
typeReexportsPresence?: boolean;
Expand Down
3 changes: 0 additions & 3 deletions packages/rspack/src/config/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,6 @@ const applyExperimentsDefaults = (
D(experiments.incremental, 'emitAssets', true);
}

// IGNORE(experiments.parallelLoader): Rspack specific configuration for parallel loader execution
D(experiments, 'parallelLoader', false);

// IGNORE(experiments.useInputFileSystem): Rspack specific configuration
// Enable `useInputFileSystem` will introduce much more fs overheads, So disable by default.
D(experiments, 'useInputFileSystem', false);
Expand Down
2 changes: 0 additions & 2 deletions packages/rspack/src/config/normalization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ export const getNormalizedRspackOptions = (
getNormalizedIncrementalOptions(options),
),
buildHttp: experiments.buildHttp,
parallelLoader: experiments.parallelLoader,
useInputFileSystem: experiments.useInputFileSystem,
};
}),
Expand Down Expand Up @@ -704,7 +703,6 @@ export interface ExperimentsNormalized {
incremental?: false | Incremental;
futureDefaults?: boolean;
buildHttp?: HttpUriPluginOptions;
parallelLoader?: boolean;
useInputFileSystem?: false | RegExp[];
/**
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
Expand Down
5 changes: 0 additions & 5 deletions packages/rspack/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2826,11 +2826,6 @@ export type Experiments = {
* @default false
*/
buildHttp?: HttpUriOptions;
/**
* Enable parallel loader
* @default false
*/
parallelLoader?: boolean;
/**
* Enable Node.js input file system
* @default false
Expand Down
5 changes: 1 addition & 4 deletions packages/rspack/src/loader-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -964,10 +964,7 @@ export async function runLoaders(
};

const enableParallelism = (currentLoaderObject: any) => {
return (
compiler.options.experiments.parallelLoader &&
currentLoaderObject?.parallel
);
return currentLoaderObject?.parallel;
};

const isomorphoicRun = async (fn: Function, args: any[]) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,4 @@ module.exports = {
}
})
],
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,4 @@ module.exports = {
createRule(10, [syncLoader, syncLoader, syncLoader])
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
{
loader: "./unclonable.js",
options: {
notclonable() {}
notclonable() { }
}
},
{
Expand All @@ -20,7 +20,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
{
loader: "./unclonable.js",
options: {
notclonable() {}
notclonable() { }
}
},
{
Expand All @@ -20,7 +20,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
},
{
module: {
Expand All @@ -47,9 +44,6 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
},
{
module: {
Expand All @@ -73,9 +67,6 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
},
{
module: {
Expand All @@ -95,8 +86,5 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
},
{
module: {
Expand All @@ -47,9 +44,6 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
},
{
module: {
Expand All @@ -73,9 +67,6 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
},
{
module: {
Expand All @@ -99,8 +90,5 @@ module.exports = [
CONTEXT: JSON.stringify(__dirname)
})
],
experiments: {
parallelLoader: true
}
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ module.exports = {
}
]
},
experiments: {
parallelLoader: true
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ module.exports = {
createRule(10, [syncLoader, syncLoader, syncLoader])
]
},
experiments: {
parallelLoader: true
}
};
1 change: 0 additions & 1 deletion tests/rspack-test/defaultsCases/default/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ module.exports = {
inlineEnum: false,
lazyBarrel: true,
lazyCompilation: false,
parallelLoader: false,
topLevelAwait: true,
typeReexportsPresence: false,
useInputFileSystem: false,
Expand Down
33 changes: 0 additions & 33 deletions website/docs/en/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,39 +148,6 @@ The table below shows the results of incremental in different scenarios:

Starting from v1.4.0, Rspack enables incremental builds for all phases by default using `'advance-silent'` mode. In previous versions, it only activated incremental builds for the `make` and `emitAssets` phases by default with `'safe'` mode.

## experiments.parallelLoader

<ApiMeta addedVersion="1.3.1" />

- **Type**: `boolean`
- **Default:** `false`

Enable parallel loader execution. You need to manually enable parallel mode for each loader using [`rules[].use.parallel`](/config/module-rules#rulesuseparallel). When enabled, the corresponding loaders will be executed in worker threads.

```js title="rspack.config.mjs"
export default {
module: {
rules: [
{
test: /\.less$/,
use: [
{
loader: 'less-loader',
parallel: true,
options: {
// loader options
},
},
],
},
],
},
experiments: {
parallelLoader: true,
},
};
```

## experiments.cache

<ApiMeta addedVersion="1.2.0-alpha.0" />
Expand Down
Loading
Loading