Skip to content

Commit

Permalink
fix(module-runner): make evaluator optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Nov 14, 2024
1 parent cf813cc commit 3567aff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/module-runner/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
import { hmrLogger, silentConsole } from './hmrLogger'
import { createHMRHandler } from './hmrHandler'
import { enableSourceMapSupport } from './sourcemap/index'
import { ESModulesEvaluator } from './esmEvaluator'

interface ModuleRunnerDebugger {
(formatter: unknown, ...args: unknown[]): void
Expand Down Expand Up @@ -61,7 +62,7 @@ export class ModuleRunner {

constructor(
public options: ModuleRunnerOptions,
public evaluator: ModuleEvaluator,
public evaluator: ModuleEvaluator = new ESModulesEvaluator(),
private debug?: ModuleRunnerDebugger,
) {
const root = this.options.root
Expand Down

0 comments on commit 3567aff

Please sign in to comment.