Skip to content

Commit

Permalink
chore: remove environment from import.meta to start a separate discus…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
sheremet-va committed Sep 23, 2024
1 parent 410753b commit 7659834
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions packages/vite/src/module-runner/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,6 @@ export class ModuleRunner {
glob() {
throw new Error('[module runner] "import.meta.glob" is not supported.')
},

// TODO: this is a proposal to start a discussion
environment: {
module: mod,
moduleGraph: this.moduleGraph,
},
}
const exports = Object.create(null)
Object.defineProperty(exports, Symbol.toStringTag, {
Expand Down
8 changes: 1 addition & 7 deletions packages/vite/src/module-runner/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
DefineImportMetadata,
SSRImportMetadata,
} from '../shared/ssrTransform'
import type { ModuleRunnerGraph, ModuleRunnerNode } from './moduleCache'
import type { ModuleRunnerGraph } from './moduleCache'
import type {
ssrDynamicImportKey,
ssrExportAllKey,
Expand All @@ -31,12 +31,6 @@ export interface ModuleRunnerImportMeta extends ImportMeta {
url: string
env: ImportMetaEnv
hot?: ViteHotContext

// TODO: this is a proposal to start a discussion
environment: {
module: ModuleRunnerNode
moduleGraph: ModuleRunnerGraph
}
[key: string]: any
}

Expand Down

0 comments on commit 7659834

Please sign in to comment.