bennypowers/lit-css

TS error due to missing `css` property in rollup plugin options

WickyNilliams opened this issue · 0 comments

Given the following rollup config:

// @ts-check
import resolve from "@rollup/plugin-node-resolve"
import typescript from "@rollup/plugin-typescript"
import litCss from "rollup-plugin-lit-css"

export default {
  input: "src/index.ts",

  plugins: [
    // Resolve bare module specifiers to relative paths
    resolve({ extensions: [".mjs", ".js", ".json", ".ts"] }),

    // transform css files into Lit-compatible format
    litCss({ include: ["src/**/*.css"] }),

    // transform typescript
    typescript({
      include: ["src/index.ts", "src/**/*.ts", "globals.d.ts"],
    }),
  ],

  output: {
    dir: "lib",
    sourcemap: true,
  },
}

TS complains with the following error:

Argument of type '{ include: string[]; }' is not assignable to parameter of type 'LitCSSOptions'.
  Property 'css' is missing in type '{ include: string[]; }' but required in type 'LitCSSOptions'