Skip to content

Commit

Permalink
chore: 修正错误的单词拼写
Browse files Browse the repository at this point in the history
  • Loading branch information
gxbsst committed Jun 13, 2024
1 parent 2c803c2 commit 6df3540
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/plugin-compiler/src/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function compileWorkers(
const globalObject = userConfig.globalObject
const srcPaths = userConfig.srcPaths

let workerEnabed = false
let workerEnabled = false

/**
* 需要编译的 worker 文件(不带后缀)
Expand All @@ -182,7 +182,7 @@ function compileWorkers(

const PLUGIN_NAME_WORKER = PLUGIN_NAME + '_WORKER'
runner.hooks.beforeBuildEntries.tap(PLUGIN_NAME_WORKER, (entryBuilder) => {
workerEnabed = !!entryBuilder.appJson?.workers
workerEnabled = !!entryBuilder.appJson?.workers
})

compiler.hooks.normalModuleFactory.tap(PLUGIN_NAME_WORKER, (factory) => {
Expand All @@ -197,7 +197,7 @@ function compileWorkers(
.tap(PLUGIN_NAME_WORKER, (parser) => parse(parser))

function parse(parser: webpack.javascript.JavascriptParser) {
if (!workerEnabed) return
if (!workerEnabled) return

type Expression = Parameters<
ReturnType<
Expand Down Expand Up @@ -240,7 +240,7 @@ function compileWorkers(
compilation.hooks.additionalAssets.tapPromise(
PLUGIN_NAME_WORKER,
async () => {
if (!workerEnabed || !workerFiles.size) return
if (!workerEnabled || !workerFiles.size) return

for await (const file of workerFiles) {
const entryName = file + '.js'
Expand Down

0 comments on commit 6df3540

Please sign in to comment.