Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Nov 11, 2024
1 parent dd52e62 commit a69a5ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion packages/vite/src/node/server/environments/rolldown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ class RolldownEnvironment extends DevEnvironment {
await super.init()
// patch out plugin container hooks
assert(this._pluginContainer)
this._pluginContainer.resolveRollupOptions = async () => undefined!
this._pluginContainer.buildStart = async () => {}
this._pluginContainer.close = async () => {}
await this.build()
Expand Down
9 changes: 3 additions & 6 deletions packages/vite/src/node/server/pluginContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ export async function createEnvironmentPluginContainer(
plugins,
watcher,
)
if (environment.config.experimental.rolldownDev) {
return container
}
await container.resolveRollupOptions()
return container
}
Expand Down Expand Up @@ -257,9 +260,6 @@ class EnvironmentPluginContainer {
}

async resolveRollupOptions(): Promise<InputOptions> {
if (this.environment.config.experimental.rolldownDev) {
return undefined!
}
if (!this._resolvedRollupOptions) {
let options = this.environment.config.build.rollupOptions
for (const optionsHook of this.getSortedPluginHooks('options')) {
Expand Down Expand Up @@ -310,9 +310,6 @@ class EnvironmentPluginContainer {
}

async buildStart(_options?: InputOptions): Promise<void> {
if (this.environment.config.experimental.rolldownDev) {
return
}
if (this._started) {
if (this._buildStartPromise) {
await this._buildStartPromise
Expand Down

0 comments on commit a69a5ff

Please sign in to comment.