mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-07 06:07:42 +02:00
chore(v2): use boolean
instead of Boolean
for type (#1551)
This commit is contained in:
parent
7115cfc743
commit
cbf80bef5a
3 changed files with 7 additions and 7 deletions
|
@ -17,7 +17,7 @@ interface ChunkRegistry {
|
|||
type Module =
|
||||
| {
|
||||
path: string;
|
||||
__import?: Boolean;
|
||||
__import?: boolean;
|
||||
query?: ParsedUrlQueryInput;
|
||||
}
|
||||
| string;
|
||||
|
|
|
@ -18,7 +18,7 @@ const CSS_MODULE_REGEX = /\.module\.css$/;
|
|||
|
||||
export function createBaseConfig(
|
||||
props: Props,
|
||||
isServer: Boolean,
|
||||
isServer: boolean,
|
||||
): Configuration {
|
||||
const {
|
||||
outDir,
|
||||
|
|
|
@ -13,7 +13,7 @@ import {version as cacheLoaderVersion} from 'cache-loader/package.json';
|
|||
|
||||
// Utility method to get style loaders
|
||||
export function getStyleLoaders(
|
||||
isServer: Boolean,
|
||||
isServer: boolean,
|
||||
cssOptions: {
|
||||
[key: string]: any;
|
||||
} = {},
|
||||
|
@ -43,7 +43,7 @@ export function getStyleLoaders(
|
|||
return loaders;
|
||||
}
|
||||
|
||||
export function getCacheLoader(isServer: Boolean, cacheOptions?: {}): Loader {
|
||||
export function getCacheLoader(isServer: boolean, cacheOptions?: {}): Loader {
|
||||
return {
|
||||
loader: require.resolve('cache-loader'),
|
||||
options: Object.assign(
|
||||
|
@ -55,7 +55,7 @@ export function getCacheLoader(isServer: Boolean, cacheOptions?: {}): Loader {
|
|||
};
|
||||
}
|
||||
|
||||
export function getBabelLoader(isServer: Boolean, babelOptions?: {}): Loader {
|
||||
export function getBabelLoader(isServer: boolean, babelOptions?: {}): Loader {
|
||||
return {
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: Object.assign(
|
||||
|
@ -76,13 +76,13 @@ export function getBabelLoader(isServer: Boolean, babelOptions?: {}): Loader {
|
|||
* Helper function to modify webpack config
|
||||
* @param {Object | Function} configureWebpack a webpack config or a function to modify config
|
||||
* @param {Object} config initial webpack config
|
||||
* @param {Boolean} isServer indicates if this is a server webpack configuration
|
||||
* @param {boolean} isServer indicates if this is a server webpack configuration
|
||||
* @returns {Object} final/ modified webpack config
|
||||
*/
|
||||
export function applyConfigureWebpack(
|
||||
configureWebpack: any,
|
||||
config: Configuration,
|
||||
isServer: Boolean,
|
||||
isServer: boolean,
|
||||
): Configuration {
|
||||
if (typeof configureWebpack === 'object') {
|
||||
return merge(config, configureWebpack);
|
||||
|
|
Loading…
Add table
Reference in a new issue