mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-08 22:57:20 +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 =
|
type Module =
|
||||||
| {
|
| {
|
||||||
path: string;
|
path: string;
|
||||||
__import?: Boolean;
|
__import?: boolean;
|
||||||
query?: ParsedUrlQueryInput;
|
query?: ParsedUrlQueryInput;
|
||||||
}
|
}
|
||||||
| string;
|
| string;
|
||||||
|
|
|
@ -18,7 +18,7 @@ const CSS_MODULE_REGEX = /\.module\.css$/;
|
||||||
|
|
||||||
export function createBaseConfig(
|
export function createBaseConfig(
|
||||||
props: Props,
|
props: Props,
|
||||||
isServer: Boolean,
|
isServer: boolean,
|
||||||
): Configuration {
|
): Configuration {
|
||||||
const {
|
const {
|
||||||
outDir,
|
outDir,
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {version as cacheLoaderVersion} from 'cache-loader/package.json';
|
||||||
|
|
||||||
// Utility method to get style loaders
|
// Utility method to get style loaders
|
||||||
export function getStyleLoaders(
|
export function getStyleLoaders(
|
||||||
isServer: Boolean,
|
isServer: boolean,
|
||||||
cssOptions: {
|
cssOptions: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
} = {},
|
} = {},
|
||||||
|
@ -43,7 +43,7 @@ export function getStyleLoaders(
|
||||||
return loaders;
|
return loaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCacheLoader(isServer: Boolean, cacheOptions?: {}): Loader {
|
export function getCacheLoader(isServer: boolean, cacheOptions?: {}): Loader {
|
||||||
return {
|
return {
|
||||||
loader: require.resolve('cache-loader'),
|
loader: require.resolve('cache-loader'),
|
||||||
options: Object.assign(
|
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 {
|
return {
|
||||||
loader: require.resolve('babel-loader'),
|
loader: require.resolve('babel-loader'),
|
||||||
options: Object.assign(
|
options: Object.assign(
|
||||||
|
@ -76,13 +76,13 @@ export function getBabelLoader(isServer: Boolean, babelOptions?: {}): Loader {
|
||||||
* Helper function to modify webpack config
|
* Helper function to modify webpack config
|
||||||
* @param {Object | Function} configureWebpack a webpack config or a function to modify config
|
* @param {Object | Function} configureWebpack a webpack config or a function to modify config
|
||||||
* @param {Object} config initial webpack 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
|
* @returns {Object} final/ modified webpack config
|
||||||
*/
|
*/
|
||||||
export function applyConfigureWebpack(
|
export function applyConfigureWebpack(
|
||||||
configureWebpack: any,
|
configureWebpack: any,
|
||||||
config: Configuration,
|
config: Configuration,
|
||||||
isServer: Boolean,
|
isServer: boolean,
|
||||||
): Configuration {
|
): Configuration {
|
||||||
if (typeof configureWebpack === 'object') {
|
if (typeof configureWebpack === 'object') {
|
||||||
return merge(config, configureWebpack);
|
return merge(config, configureWebpack);
|
||||||
|
|
Loading…
Add table
Reference in a new issue