GithubHelp home page GithubHelp logo

Comments (4)

marvin-j97 avatar marvin-j97 commented on August 25, 2024 1

After changing the vite.config.ts and app.config.ts and updating vinxi to 0.3.6, unocss as a plugin still doesn't work and here is the error:

TS2345: Argument of type  { plugins: Plugin<any>[][]; }  is not assignable to parameter of type  SolidStartInlineConfig  Object literal may only specify known properties, and  plugins  does not exist in type  SolidStartInlineConfig

Vinxi is very unstable, I feel fear with each update.

For me, Uno works with 0.3.6.

You have to nest the plugins parameter into vite, see my config above.

The Typescript error is still there, but it also happens if you use Vite's defineConfig, so the types are not matching up. I think it's due to Vite 5 and Uno's types not lining up.

from solid-start.

marvin-j97 avatar marvin-j97 commented on August 25, 2024

If you are using the latest version, you need to change the vite.config.ts to app.config.ts

import { defineConfig } from "@solidjs/start/config";
import UnoCSS from "unocss/vite";

export default defineConfig({
  vite: {
    plugins: [UnoCSS()],
  }
});

The TS2322 error will still happen, but I don't think SolidStart is at fault here.

from solid-start.

malekim avatar malekim commented on August 25, 2024

After changing the vite.config.ts and app.config.ts and updating vinxi to 0.3.6, unocss as a plugin still doesn't work and here is the error:

TS2345: Argument of type  { plugins: Plugin<any>[][]; }  is not assignable to parameter of type  SolidStartInlineConfig  Object literal may only specify known properties, and  plugins  does not exist in type  SolidStartInlineConfig

Vinxi is very unstable, I feel fear with each update.

from solid-start.

malekim avatar malekim commented on August 25, 2024

You're right, nesting the config worked for me. Thank you. I can confirm that typescript error also disappeared. With pnpm there is a need to completely delete node_modules and pnpm install again to get rid of the error.

This is the solution:

import UnoCSS from "unocss/vite";

export default defineConfig({
  vite: {
    plugins: [UnoCSS()],
  }
});`

from solid-start.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.