From 81d0b38dbd18eddcdad4a782ab77a22bd35ed5e7 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Fri, 25 Sep 2020 13:57:43 +0100 Subject: [PATCH] CSS generate comment --- lib/css-plugin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/css-plugin.js b/lib/css-plugin.js index f2f4a6a3..71df654c 100644 --- a/lib/css-plugin.js +++ b/lib/css-plugin.js @@ -103,9 +103,11 @@ export default function (resolveFileUrl) { `export const ${camelCase(key)} = ${JSON.stringify(val)};`, ); - const defs = Object.keys(moduleJSON) - .map((key) => `export const ${camelCase(key)}: string;`) - .join('\n'); + const defs = + '// This file is autogenerated by lib/css-plugin.js\n' + + Object.keys(moduleJSON) + .map((key) => `export const ${camelCase(key)}: string;`) + .join('\n'); const defPath = path + '.d.ts'; const currentDefFileContent = await fsp