protibimbok / django-vite-plugin

This plugin configures Vite for use with Django backend.
103 stars 13 forks source link

add type for djangoVitePlugin "list mode" #23

Closed scratchmex closed 1 year ago

scratchmex commented 1 year ago

fixes

Argument of type 'string[]' is not assignable to parameter of type 'PluginConfig'.

when doing

import { defineConfig } from 'vite'
import djangoVite from 'django-vite-plugin'

export default defineConfig({
    plugins: [
        djangoVite([
            'app/tailwind.css',
        ])
    ],
})
protibimbok commented 1 year ago

It's weird that my editor never complained about. Anyways, just changing the type is not enough. You have to assign the values appropriately then too. image

This can be fixed like this: image

But then we will have a code duplication down the road.

We must come up with a cleaner solution.

protibimbok commented 1 year ago

It's done in #29