moko-resources icon indicating copy to clipboard operation
moko-resources copied to clipboard

webpack.config.d/moko-resources-generated.js is generated with invalid path on Windows

Open lupuuss opened this issue 3 years ago • 2 comments

This line should generate path literal "C:\\users\\example\\projects\\test" on Windows, but it generates "C:\users\example\projects\test".

lupuuss avatar Jun 20 '22 21:06 lupuuss

why should be line with escaped ?

Alex009 avatar Jun 23 '22 08:06 Alex009

It leads to this line in generated js script const mokoResourcePath = path.resolve("C:\users\example\projects\test");. String literal is invalid because single \ is treated as escape character, but we need \ to be a part of a path so it must be repeated.

lupuuss avatar Jun 29 '22 12:06 lupuuss

will be released in 0.21.0

Alex009 avatar Mar 12 '23 17:03 Alex009