Skip to content

Commit

Permalink
Remove unnecessary async
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Dec 11, 2019
1 parent 55e379e commit 60be950
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/build/webpack/config/blocks/css/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function getError_NullConfig(pluginName: string) {
)}, otherwise, pass ${chalk.bold('true')} or a configuration object.`
}

async function isIgnoredPlugin(pluginPath: string): Promise<boolean> {
function isIgnoredPlugin(pluginPath: string): boolean {
const ignoredRegex = /(?:^|[\\/])(postcss-modules-values|postcss-modules-scope|postcss-modules-extract-imports|postcss-modules-local-by-default|postcss-modules)(?:[\\/]|$)/i
const match = ignoredRegex.exec(pluginPath)
if (match == null) {
Expand All @@ -46,7 +46,7 @@ async function loadPlugin(
pluginName: string,
options: boolean | object
): Promise<import('postcss').AcceptedPlugin | false> {
if (options === false || (await isIgnoredPlugin(pluginName))) {
if (options === false || isIgnoredPlugin(pluginName)) {
return false
}

Expand All @@ -56,7 +56,7 @@ async function loadPlugin(
}

const pluginPath = resolveRequest(pluginName, `${dir}/`)
if (await isIgnoredPlugin(pluginPath)) {
if (isIgnoredPlugin(pluginPath)) {
return false
} else if (options === true) {
return require(pluginPath)
Expand Down

0 comments on commit 60be950

Please sign in to comment.