Skip to content

Commit 3888fe8

Browse files
committedMar 31, 2023
style: add error prompt for windows.
1 parent 6dc32da commit 3888fe8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎packages/core/src/compile.ts

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ export async function compile(options: CompileOptions = {}) {
3232
(options.entry || []).forEach((fileNames) => err.push(` \x1b[35;1m${fileNames}\x1b[0m`));
3333
!options.entry?.length &&
3434
err.push('\x1b[33;1mNo files were indexed. Please check your command line arguments.\x1b[0m');
35+
if (process.platform === 'win32') {
36+
err.push('\n Please note that on \x1b[33;1mWindows\x1b[0m platform, double(") quotes should be used to ');
37+
err.push(" index file parameters instead of single(') quotes.\n");
38+
err.push(' Correct usage: \x1b[32;1m"src/*.tsx"\x1b[0m');
39+
err.push(" Incorrect usage: \x1b[31;1m'src/*.tsx'\x1b[0m");
40+
}
3541
throw new Error(err.join('\n'));
3642
}
3743
babelTransform(options);

0 commit comments

Comments
 (0)
Please sign in to comment.