Add type annotations to transform()

This commit is contained in:
Nikita Karamov 2024-02-25 01:13:26 +01:00
parent 8f61bc80c1
commit 95e1011dca

View file

@ -54,7 +54,7 @@ const lightningCssPlugin = () => {
const targets = browserslistToTargets(browserslist()); const targets = browserslistToTargets(browserslist());
return { return {
name: "vite-plugin-lightningcss", name: "vite-plugin-lightningcss",
transform(source, id) { transform(source: string, id: string) {
if (!id.endsWith(".css")) return; if (!id.endsWith(".css")) return;
const { code, map } = transform({ const { code, map } = transform({