Skip to content

Use rollup types from Vite #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import os from 'os'
import { fileURLToPath } from 'url'
import path from 'path'
import colors from 'picocolors'
import { Plugin, loadEnv, UserConfig, ConfigEnv, ResolvedConfig, SSROptions, PluginOption } from 'vite'
import { Plugin, loadEnv, UserConfig, ConfigEnv, ResolvedConfig, SSROptions, PluginOption, Rollup } from 'vite'
import fullReload, { Config as FullReloadConfig } from 'vite-plugin-full-reload'
import { InputOption } from "rollup"

interface PluginConfig {
/**
* The path or paths of the entry points to compile.
*/
input: InputOption
input: Rollup.InputOption

/**
* Laravel's public directory.
Expand All @@ -38,7 +37,7 @@ interface PluginConfig {
/**
* The path of the SSR entry point.
*/
ssr?: InputOption
ssr?: Rollup.InputOption

/**
* The directory where the SSR bundle should be written.
Expand Down Expand Up @@ -376,7 +375,7 @@ function resolveBase(config: Required<PluginConfig>, assetUrl: string): string {
/**
* Resolve the Vite input path from the configuration.
*/
function resolveInput(config: Required<PluginConfig>, ssr: boolean): InputOption|undefined {
function resolveInput(config: Required<PluginConfig>, ssr: boolean): Rollup.InputOption|undefined {
if (ssr) {
return config.ssr
}
Expand Down