Skip to content
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

[BUGFIX-1] - Update typing #2

Merged
merged 1 commit into from
Aug 6, 2022

Conversation

DcBD
Copy link
Owner

@DcBD DcBD commented Aug 6, 2022

Changed the type of the plugin function from Plugin to PluginOption due to changes in vite 3.0.0.

This may cause some typing issues when using vite < 3.0.0

There's simple workaround that shouldn't cause any isues, simply cast the hugoPlugin(..) to PluginOptions

e.g

import { defineConfig, PluginOption } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        hugoPlugin({ appDir, hugoOutDir }) as PluginOption
    ]
});

@DcBD DcBD merged commit 1262482 into main Aug 6, 2022
@DcBD DcBD deleted the bugfix-1-type-not-assignable-to-plugin-option branch August 6, 2022 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant