CSS generate comment

This commit is contained in:
Jake Archibald
2020-09-25 13:57:43 +01:00
parent b47d6b4696
commit 81d0b38dbd

View File

@@ -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